pub struct UnidentifiedAtom<'a> { /* private fields */ }
Expand description
An atom of yet unknown type.
This is used by reading handles that have to return a reference to an atom, but can not check it’s type. This struct contains a Space
containing the header and the body of the atom and can identify/read the atom from it.
Implementations§
Source§impl<'a> UnidentifiedAtom<'a>
impl<'a> UnidentifiedAtom<'a>
Sourcepub fn new(space: Space<'a>) -> Self
pub fn new(space: Space<'a>) -> Self
Construct a new unidentified atom.
The space actually has to contain an atom. If it doesn’t, crazy (but not undefined) things can happen.
Sourcepub fn read<'b, A: Atom<'a, 'b>>(
self,
urid: URID<A>,
parameter: A::ReadParameter,
) -> Option<A::ReadHandle>
pub fn read<'b, A: Atom<'a, 'b>>( self, urid: URID<A>, parameter: A::ReadParameter, ) -> Option<A::ReadHandle>
Try to read the atom.
To identify the atom, it’s URID and an atom-specific parameter is needed. If the atom was identified, a reading handle is returned.
Trait Implementations§
Source§impl<'a> Clone for UnidentifiedAtom<'a>
impl<'a> Clone for UnidentifiedAtom<'a>
Source§fn clone(&self) -> UnidentifiedAtom<'a>
fn clone(&self) -> UnidentifiedAtom<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl<'a> Copy for UnidentifiedAtom<'a>
Auto Trait Implementations§
impl<'a> Freeze for UnidentifiedAtom<'a>
impl<'a> RefUnwindSafe for UnidentifiedAtom<'a>
impl<'a> Send for UnidentifiedAtom<'a>
impl<'a> Sync for UnidentifiedAtom<'a>
impl<'a> Unpin for UnidentifiedAtom<'a>
impl<'a> UnwindSafe for UnidentifiedAtom<'a>
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