Struct manually_boxed::MultiStatic
source · pub struct MultiStatic<'a, L> { /* private fields */ }
Expand description
Tracker for multiple borrows (static)
Returned from IsTokenMut::multi_static
.
Implementations§
source§impl<'a, L: MultiStaticList> MultiStatic<'a, L>
impl<'a, L: MultiStaticList> MultiStatic<'a, L>
sourcepub fn borrow<'r, T>(
self,
p: Ptr<T>,
) -> Result<(&'r T, MultiStatic<'a, (L, *const ())>), Self>where
'a: 'r,
pub fn borrow<'r, T>(
self,
p: Ptr<T>,
) -> Result<(&'r T, MultiStatic<'a, (L, *const ())>), Self>where
'a: 'r,
Borrows p
immutably
Returns the requested borrow, &T
,
and MultiStatic
that can be used for further borrowing.
If p
has already been mutably borrowed, returns Err
.
sourcepub fn borrow_mut<'r, T>(
self,
p: Ptr<T>,
) -> Result<(&'r mut T, MultiStatic<'a, (L, NonNull<()>)>), Self>where
'a: 'r,
pub fn borrow_mut<'r, T>(
self,
p: Ptr<T>,
) -> Result<(&'r mut T, MultiStatic<'a, (L, NonNull<()>)>), Self>where
'a: 'r,
Borrows p
mutably
Returns the requested borrow, &mut T
,
and MultiStatic
that can be used for further borrowing.
If p
has already been borrowed, returns Err
.
Auto Trait Implementations§
impl<'a, L> Freeze for MultiStatic<'a, L>where
L: Freeze,
impl<'a, L> RefUnwindSafe for MultiStatic<'a, L>where
L: RefUnwindSafe,
impl<'a, L> Send for MultiStatic<'a, L>where
L: Send,
impl<'a, L> Sync for MultiStatic<'a, L>where
L: Sync,
impl<'a, L> Unpin for MultiStatic<'a, L>where
L: Unpin,
impl<'a, L> !UnwindSafe for MultiStatic<'a, L>
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