Skip to main content

Config

Trait Config 

Source
pub trait Config:
    InternalEndianConfig
    + InternalIntEncodingConfig
    + InternalLimitConfig
    + InternalBitPackingConfig
    + InternalBitOrderingConfig
    + InternalFingerprintConfig
    + InternalFormatConfig
    + InternalConfigFingerprint
    + InternalFingerprintConfigExt
    + Copy
    + Clone {
    // Required methods
    fn endianness(&self) -> Endianness;
    fn int_encoding(&self) -> IntEncoding;
    fn limit(&self) -> Option<usize>;
    fn bit_packing_enabled(&self) -> bool;
    fn bit_ordering(&self) -> BitOrdering;
    fn fingerprint_mode(&self) -> FingerprintMode;
    fn format(&self) -> Format;
    fn cbor_options(&self) -> CborOptions;
    fn is_compact_net(&self) -> bool;
}
Expand description

Indicates a type is valid for controlling the bincode configuration

Required Methods§

Source

fn endianness(&self) -> Endianness

This configuration’s Endianness

Source

fn int_encoding(&self) -> IntEncoding

This configuration’s Integer Encoding

Source

fn limit(&self) -> Option<usize>

This configuration’s byte limit, or None if no limit is configured

Source

fn bit_packing_enabled(&self) -> bool

Whether bit-packing is enabled for this configuration

Source

fn bit_ordering(&self) -> BitOrdering

Returns the bit ordering of this configuration

Source

fn fingerprint_mode(&self) -> FingerprintMode

Returns the fingerprint mode of this configuration

Source

fn format(&self) -> Format

Returns the format of this configuration

Source

fn cbor_options(&self) -> CborOptions

Returns the CBOR options of this configuration. Returns default options if the format is not CBOR.

Source

fn is_compact_net(&self) -> bool

Returns true if this configuration uses compact network encoding (omitting flowinfo/scope_id).

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<T> Config for T
where T: InternalEndianConfig + InternalIntEncodingConfig + InternalLimitConfig + InternalBitPackingConfig + InternalBitOrderingConfig + InternalFingerprintConfig + InternalFormatConfig + InternalConfigFingerprint + InternalFingerprintConfigExt + Copy + Clone,