Trait Lockable

Source
pub trait Lockable<'invoker, 'buffer, B: Buffer> {
    type Locked;

    // Required method
    fn lock(
        &self,
        invoker: &'invoker mut Invoker,
        buffer: &'buffer mut B,
    ) -> Self::Locked;
}
Expand description

A component that can be given an Invoker and a byte buffer in order to access its methods.

Required Associated Types§

Source

type Locked

The type obtained when locking the component.

Required Methods§

Source

fn lock( &self, invoker: &'invoker mut Invoker, buffer: &'buffer mut B, ) -> Self::Locked

Locks the component so methods can be invoked on it.

The Invoker and a scratch buffer must be provided. They are released and can be reused once the locked value is dropped.

Implementors§