Trait borrow_or_share::Bos
source · pub trait Bos<T: ?Sized> {
type Ref<'this>: Ref<T>
where Self: 'this;
// Required method
fn borrow_or_share(this: &Self) -> Self::Ref<'_>;
}
Expand description
A trait for either borrowing or sharing data.
See the crate-level documentation for more details.
Required Associated Types§
Required Methods§
Borrows from *this
or from behind a reference it holds,
returning a reference of type Self::Ref
.
In the latter case, the returned reference is said to be shared with *this
.
Object Safety§
This trait is not object safe.