Transcript

Trait Transcript 

Source
pub trait Transcript {
    // Required methods
    fn new(label: &'static [u8]) -> Self;
    fn new_with_session_id(label: &'static [u8], session_id: &SessionId) -> Self;
    fn append<T: AsRef<[u8]>>(&mut self, label: &'static [u8], message: &T);
    fn append_many<T: AsRef<[u8]>>(
        &mut self,
        label: &'static [u8],
        values: &[T],
    );
    fn extract<T: AsMut<[u8]>>(&mut self, label: &'static [u8], dest: &mut T);

    // Provided method
    fn append_serializable<T: Serialize>(
        &mut self,
        label: &'static [u8],
        value: &T,
    ) { ... }
}

Required Methods§

Source

fn new(label: &'static [u8]) -> Self

Source

fn new_with_session_id(label: &'static [u8], session_id: &SessionId) -> Self

Source

fn append<T: AsRef<[u8]>>(&mut self, label: &'static [u8], message: &T)

Source

fn append_many<T: AsRef<[u8]>>(&mut self, label: &'static [u8], values: &[T])

Source

fn extract<T: AsMut<[u8]>>(&mut self, label: &'static [u8], dest: &mut T)

Provided Methods§

Source

fn append_serializable<T: Serialize>(&mut self, label: &'static [u8], value: &T)

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.

Implementors§