Skip to main content

ConfigCore

Trait ConfigCore 

Source
pub trait ConfigCore: 'static + Sized {
    type ByteOrder: ByteOrder;
    type IntEncoding: IntEncoding<Self::ByteOrder>;

    const PREALLOCATION_SIZE_LIMIT: Option<usize>;
    const ZERO_COPY_ALIGN_CHECK: bool;
}
Expand description

Trait for accessing configuration values when only the constant knobs are needed (e.g., PREALLOCATION_SIZE_LIMIT, ZERO_COPY_ALIGN_CHECK).

Split from Config to avoid dependency cycles that can overflow the compiler stack, such as SeqLen -> Config -> SeqLen.

Prefer this trait over Config when you don’t need configuration type parameters that themselves depend on Config (e.g., SeqLen, which depends on ConfigCore).

Required Associated Constants§

Required Associated Types§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<const ZERO_COPY_ALIGN_CHECK: bool, const PREALLOCATION_SIZE_LIMIT: usize, LengthEncoding: 'static, B, I, TagEncoding: 'static> ConfigCore for Configuration<ZERO_COPY_ALIGN_CHECK, PREALLOCATION_SIZE_LIMIT, LengthEncoding, B, I, TagEncoding>
where B: ByteOrder, I: IntEncoding<B>,