pub struct BaseRef<Ctx, Id: Identifier> {
pub id: Id,
pub ctx: Ctx,
}Expand description
A generic wrapper struct for referencing an ID with a context.
This is the basis for all *Ref and *MutRef
Fields§
§id: Id§ctx: CtxImplementations§
Trait Implementations§
Source§impl<'ctx, Ctx, Id: Identifier> From<BaseRef<&'ctx mut Ctx, Id>> for BaseRef<&'ctx Ctx, Id>
Convert mutable refs to immutable refs by cloning the ID and sharing the context reference.
impl<'ctx, Ctx, Id: Identifier> From<BaseRef<&'ctx mut Ctx, Id>> for BaseRef<&'ctx Ctx, Id>
Convert mutable refs to immutable refs by cloning the ID and sharing the context reference.
Source§fn from(r: BaseRef<&'ctx mut Ctx, Id>) -> Self
fn from(r: BaseRef<&'ctx mut Ctx, Id>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<Ctx, Id> Freeze for BaseRef<Ctx, Id>
impl<Ctx, Id> RefUnwindSafe for BaseRef<Ctx, Id>where
Id: RefUnwindSafe,
Ctx: RefUnwindSafe,
impl<Ctx, Id> Send for BaseRef<Ctx, Id>
impl<Ctx, Id> Sync for BaseRef<Ctx, Id>
impl<Ctx, Id> Unpin for BaseRef<Ctx, Id>
impl<Ctx, Id> UnsafeUnpin for BaseRef<Ctx, Id>where
Id: UnsafeUnpin,
Ctx: UnsafeUnpin,
impl<Ctx, Id> UnwindSafe for BaseRef<Ctx, Id>where
Id: UnwindSafe,
Ctx: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more