encode_into_slice

Function encode_into_slice 

Source
pub fn encode_into_slice<E: Encode, C: Config>(
    val: E,
    dst: &mut [u8],
    config: C,
) -> Result<usize, EncodeError>
Expand description

Encode the given value into the given slice. Returns the amount of bytes that have been written.

See the config module for more information on configurations.

ยงErrors

Returns an EncodeError if the slice is too small or the value cannot be encoded.