Transcript

Trait Transcript 

Source
pub trait Transcript {
    type Rng: RngCore;

    // Required methods
    fn new(label: &'static [u8]) -> Self;
    fn new_with_session_id(label: &'static [u8], session_id: &SessionId) -> Self;
    fn append<S: AsRef<[u8]>>(&mut self, label: &'static [u8], message: &S);
    fn append_many<S: AsRef<[u8]>>(
        &mut self,
        label: &'static [u8],
        values: &[S],
    );
    fn extract<S: AsMut<[u8]>>(&mut self, label: &'static [u8], dest: &mut S);
    fn derive_rng(&mut self, label: &'static [u8]) -> Self::Rng;

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

Required Associated Types§

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<S: AsRef<[u8]>>(&mut self, label: &'static [u8], message: &S)

Source

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

Source

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

Source

fn derive_rng(&mut self, label: &'static [u8]) -> Self::Rng

Provided Methods§

Source

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

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§