pub struct OwnedId<'a> {
pub id: Id,
/* private fields */
}Expand description
An ExclusiveId that is associated with an IdOwner.
It is automatically returned to the IdOwner when dropped.
Fields§
§id: IdThe underlying identifier.
Methods from Deref<Target = Id>§
Sourcepub fn acquire(&self) -> Option<ExclusiveId>
pub fn acquire(&self) -> Option<ExclusiveId>
Takes ownership of this Id from the current write context (i.e. thread).
Returns None if this Id was not found, because it is not associated with this
write context, or because it is currently acquired.
Trait Implementations§
Source§impl AsRef<ExclusiveId> for OwnedId<'_>
impl AsRef<ExclusiveId> for OwnedId<'_>
Source§fn as_ref(&self) -> &ExclusiveId
fn as_ref(&self) -> &ExclusiveId
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Borrow<ExclusiveId> for OwnedId<'_>
impl Borrow<ExclusiveId> for OwnedId<'_>
Source§fn borrow(&self) -> &ExclusiveId
fn borrow(&self) -> &ExclusiveId
Immutably borrows from an owned value. Read more
Source§impl Encodes<&OwnedId<'_>> for GenId
impl Encodes<&OwnedId<'_>> for GenId
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for OwnedId<'a>
impl<'a> !Send for OwnedId<'a>
impl<'a> !Sync for OwnedId<'a>
impl<'a> !UnwindSafe for OwnedId<'a>
impl<'a> Freeze for OwnedId<'a>
impl<'a> Unpin for OwnedId<'a>
impl<'a> UnsafeUnpin for OwnedId<'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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<S, T> IntoEncoded<S> for Twhere
S: Encodes<T>,
impl<S, T> IntoEncoded<S> for Twhere
S: Encodes<T>,
Source§fn into_encoded(self) -> <T as IntoEncoded<S>>::Output
fn into_encoded(self) -> <T as IntoEncoded<S>>::Output
Run the conversion.
Source§impl<S, T> IntoInline<S> for T
impl<S, T> IntoInline<S> for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Lower case
letters are used (e.g. f9b4ca)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Upper case
letters are used (e.g. F9B4CA)