[−][src]Trait pui_cell::IdentifierExt
An extension trait that provides functionality to get
values out of IdCell
s safely. This trait is automatically
implemented for any type that implements Identifier
. So
you just need to bring it into scope to use it.
Provided methods
pub fn owns<V: ?Sized>(&self, cell: &IdCell<V, Self::Token>) -> bool
[src]
Returns true if this identifier owns the IdCell
pub fn cell<V>(&self, value: V) -> IdCell<V, Self::Token>
[src]
Create a new cell that is owned by this identifer
pub fn get<'a, A: ?Sized>(&'a self, a: &'a IdCell<A, Self::Token>) -> &'a A
[src]
pub fn get_mut<'a, A: ?Sized>(
&'a mut self,
a: &'a IdCell<A, Self::Token>
) -> &'a mut A
[src]
&'a mut self,
a: &'a IdCell<A, Self::Token>
) -> &'a mut A
pub fn get_mut2<'a, A: ?Sized, B: ?Sized>(
&'a mut self,
a: &'a IdCell<A, Self::Token>,
b: &'a IdCell<B, Self::Token>
) -> (&'a mut A, &'a mut B)
[src]
&'a mut self,
a: &'a IdCell<A, Self::Token>,
b: &'a IdCell<B, Self::Token>
) -> (&'a mut A, &'a mut B)
Get unique references both of the IdCell
s
Panic
Will panic if self doesn't own any of the IdCell
s or if
either of the two IdCell
s overlap
pub fn get_mut3<'a, A: ?Sized, B: ?Sized, C: ?Sized>(
&'a mut self,
a: &'a IdCell<A, Self::Token>,
b: &'a IdCell<B, Self::Token>,
c: &'a IdCell<C, Self::Token>
) -> (&'a mut A, &'a mut B, &'a mut C)
[src]
&'a mut self,
a: &'a IdCell<A, Self::Token>,
b: &'a IdCell<B, Self::Token>,
c: &'a IdCell<C, Self::Token>
) -> (&'a mut A, &'a mut B, &'a mut C)
Get unique references from all three of the IdCell
s
Panic
Will panic if self doesn't own any of the IdCell
s or if
any of the three IdCell
s overlap
pub fn get_all_mut<'a, L>(&'a mut self, list: L) -> L::Output where
L: GetAllMut<&'a mut Self>,
[src]
L: GetAllMut<&'a mut Self>,
Get unique references from all of the IdCell
s
Panic
Will panic if self doesn't own any of the IdCell
s or if
any of the three IdCell
s overlap
pub fn try_get_all_mut<'a, L>(&'a mut self, list: L) -> Option<L::Output> where
L: GetAllMut<&'a mut Self>,
[src]
L: GetAllMut<&'a mut Self>,
Tries to get unique references from all of the IdCell
s
Returns None if any of the IdCells
overlap
Panic
Will panic if self doesn't own any of the IdCell
s
pub fn swap<V>(
&mut self,
a: &IdCell<V, Self::Token>,
b: &IdCell<V, Self::Token>
)
[src]
&mut self,
a: &IdCell<V, Self::Token>,
b: &IdCell<V, Self::Token>
)
Swap two IdCell
s without uninitializing either one