Trait sodoken::buffer::AsExtendMut[][src]

pub trait AsExtendMut<'a>: 'a {
    unsafe fn unsafe_extend_mut(
        &mut self,
        len: usize
    ) -> SodokenResult<&mut [u8]>; fn extend_mut(&mut self, len: usize) -> SodokenResult<&mut [u8]> { ... }
fn extend_mut_from_slice(&mut self, oth: &[u8]) -> SodokenResult<()> { ... } }
Expand description

Indicates we can append bytes without pre-initializing them.

Required methods

Safety

this is unsafe because the process could potentially

  • read uninitialized data from the returned slice
  • or fail to initialize the data in the returned slice

Provided methods

You probably don’t want this function… it leads to an extra slow initialization step. See unsafe_extend_mut or extend_mut_from_slice.

Extend this extendable buffer with given slice

Implementors