pub struct Identified<Id: Identifier, T> {
pub id: Id,
pub inner: T,
}Expand description
A value paired with its typed identifier.
Fields§
§id: Id§inner: TImplementations§
Source§impl<Id: Identifier, T> Identified<Id, T>
impl<Id: Identifier, T> Identified<Id, T>
Source§impl<'a, Id: Identifier, T> Identified<Id, &'a mut T>
impl<'a, Id: Identifier, T> Identified<Id, &'a mut T>
Sourcepub fn immutable(self) -> Identified<Id, &'a T>
pub fn immutable(self) -> Identified<Id, &'a T>
Converts Identified<Id, &mut T> into Identified<Id, &T>.
Trait Implementations§
Source§impl<Id: Identifier, T: Debug> Debug for Identified<Id, T>
impl<Id: Identifier, T: Debug> Debug for Identified<Id, T>
Source§impl<Id: Identifier, T> Deref for Identified<Id, T>
impl<Id: Identifier, T> Deref for Identified<Id, T>
Source§impl<Id: Identifier, T> DerefMut for Identified<Id, T>
impl<Id: Identifier, T> DerefMut for Identified<Id, T>
Auto Trait Implementations§
impl<Id, T> Freeze for Identified<Id, T>
impl<Id, T> RefUnwindSafe for Identified<Id, T>where
Id: RefUnwindSafe,
T: RefUnwindSafe,
impl<Id, T> Send for Identified<Id, T>
impl<Id, T> Sync for Identified<Id, T>
impl<Id, T> Unpin for Identified<Id, T>
impl<Id, T> UnsafeUnpin for Identified<Id, T>where
Id: UnsafeUnpin,
T: UnsafeUnpin,
impl<Id, T> UnwindSafe for Identified<Id, T>where
Id: UnwindSafe,
T: 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