pub trait UsizeEncoding: Sealed {
// Required methods
fn encode_usize<C, W>(
cx: &mut C,
writer: W,
value: usize,
) -> Result<(), <C as Context>::Error>
where C: Context<Input = <W as Writer>::Error>,
W: Writer;
fn decode_usize<'de, C, R>(
cx: &mut C,
reader: R,
) -> Result<usize, <C as Context>::Error>
where C: Context<Input = <R as Reader<'de>>::Error>,
R: Reader<'de>;
}Expand description
Encoding formats which ensure that variably sized types (like usize,
isize) are encoded in a format which is platform-neutral.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.