Skip to main content

ByteData

Trait ByteData 

Source
pub trait ByteData:
    Sized
    + Deref<Target = [u8]>
    + DerefMut
    + Debug
    + 'static {
    // Required methods
    fn new(size: u64) -> Result<Self>;
    fn into_fungible(self) -> FungibleMemory;
    fn into_other<O: ByteData>(self) -> Result<O, MemoryAllocationError>;
    fn try_from_vec(vec: Vec<u8>) -> Result<Self, MemoryAllocationError>;
    fn try_from_slice(slice: &[u8]) -> Result<Self, MemoryAllocationError>;
    fn initial_seal(
        &mut self,
    ) -> impl Future<Output = Result<(), MemoryAllocationError>> + Send;
    fn final_seal(
        &mut self,
    ) -> impl Future<Output = Result<(), MemoryAllocationError>> + Send;
}

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§