Struct musli_utils::options::OptionsBuilder
source · pub struct OptionsBuilder(/* private fields */);
Expand description
Type encapsulating a static flavor of an encoding.
Implementations§
source§impl OptionsBuilder
impl OptionsBuilder
sourcepub const fn with_integer(self, integer: Integer) -> Self
pub const fn with_integer(self, integer: Integer) -> Self
Indicates if an integer serialization should be variable.
sourcepub const fn with_float(self, float: Float) -> Self
pub const fn with_float(self, float: Float) -> Self
Indicates the configuration of float serialization.
sourcepub const fn with_byte_order(self, byte_order: ByteOrder) -> Self
pub const fn with_byte_order(self, byte_order: ByteOrder) -> Self
Specify which byte order to use, if that’s relevant.
sourcepub const fn with_length(self, length: Integer) -> Self
pub const fn with_length(self, length: Integer) -> Self
Specify how lengths should be serialized.
sourcepub const fn with_map_keys_as_numbers(self, value: bool) -> Self
pub const fn with_map_keys_as_numbers(self, value: bool) -> Self
Allows for treating string keys as numbers.
sourcepub const fn with_length_width(self, width: Width) -> Self
pub const fn with_length_width(self, width: Width) -> Self
If length is set to Integer::Fixed
, specify the width of the length.
Auto Trait Implementations§
impl Freeze for OptionsBuilder
impl RefUnwindSafe for OptionsBuilder
impl Send for OptionsBuilder
impl Sync for OptionsBuilder
impl Unpin for OptionsBuilder
impl UnwindSafe for OptionsBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more