Trait

core::borrow::Borrow

source
forall Self, Cap, Out.
trait Borrow {
    /// `key` handed back with its readable form, `cap` fused into it.
    fn borrow(key: Self, cap: Cap) -> (Self, Out);
}

A key's readable form Out, obtained by presenting the capability Cap that permits reading what the key points to.

Methods

method borrowsource

fn borrow(key: Self, cap: Cap) -> (Self, Out);

key handed back with its readable form, cap fused into it.

Implementors

instance Borrow[Ref[T, 'k], Shared!['k, 'q], Borrowed![T, 'k, 'q]]source

forall T, 'k, 'q.
instance Borrow[Ref[T, 'k], Shared!['k, 'q], Borrowed![T, 'k, 'q]] { ... }

In core::borrow.

A Ref borrows as a Borrowed! through a Shared! capability of its domain.

instance Borrow[Str['k], C, Readable[C, Str['k]]]source

forall C, 'k where ReadBytes[C, Str['k]].
instance Borrow[Str['k], C, Readable[C, Str['k]]] { ... }

In core::borrow.

Text borrows as a Readable through any capability that can read it.