Trait mmtkvdb::storable::BorrowStorable
source · [−]pub unsafe trait BorrowStorable where
Self: Sized + Borrow<Self::Stored> + Ord, {
type Stored: ?Sized + StorableWithOwned<Self>;
fn borrow_storable(&self) -> &Self::Stored { ... }
}
Expand description
Types that can be borrowed as a type that is Storable
Automatically implemented for:
Storable
types whose owning type of the pointed-to restored value is the sameStorable
type (e.g.i32
implementsBorrowStorable<Stored=i32>
)Vec<T>
, whereT
isStorable
and the owning type of the pointed-to restored value isVec<T>
, (e.g.Vec<u8>
implementsBorrowStorable<Stored=[u8]>
)String
(withBorrowStorable::Stored
beingstr
)
Required Associated Types
type Stored: ?Sized + StorableWithOwned<Self>
type Stored: ?Sized + StorableWithOwned<Self>
Borrowed Storable
type
Provided Methods
fn borrow_storable(&self) -> &Self::Stored
fn borrow_storable(&self) -> &Self::Stored
Borrows as BorrowStorable::Stored
Does the same as Borrow::borrow
, but aids type inference