Struct qcell::QCellOwnerID
source · [−]pub struct QCellOwnerID(_);
Expand description
Internal ID associated with a QCell
owner.
The only purpose of this is to create QCell
instances without
requiring a borrow on the owner. A QCellOwnerID
can be passed
to any code that needs to create QCell
instances. However to
access those QCell
instances after creation will still require
a borrow on the original owner. Create a QCellOwnerID
from an
owner using owner.into()
or owner.id()
.
Safety
Whilst the existence of this type does mean that an ID can exist
longer than than the owner, all that allows is new QCell
instances to be created after the owner has gone. But QCell
instances can outlive the owner in any case, so this makes no
difference to safety.
Implementations
sourceimpl QCellOwnerID
impl QCellOwnerID
sourcepub fn cell<T>(self, value: T) -> QCell<T>
pub fn cell<T>(self, value: T) -> QCell<T>
Create a new cell owned by this owner-ID. See also
QCell::new
.
Trait Implementations
sourceimpl Clone for QCellOwnerID
impl Clone for QCellOwnerID
sourcefn clone(&self) -> QCellOwnerID
fn clone(&self) -> QCellOwnerID
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl From<&'_ QCellOwner> for QCellOwnerID
impl From<&'_ QCellOwner> for QCellOwnerID
sourcefn from(owner: &QCellOwner) -> Self
fn from(owner: &QCellOwner) -> Self
Converts to this type from the input type.
sourceimpl From<&'_ QCellOwnerSeq> for QCellOwnerID
impl From<&'_ QCellOwnerSeq> for QCellOwnerID
sourcefn from(owner: &QCellOwnerSeq) -> Self
fn from(owner: &QCellOwnerSeq) -> Self
Converts to this type from the input type.
sourceimpl From<Pin<&'_ QCellOwnerPinned>> for QCellOwnerID
impl From<Pin<&'_ QCellOwnerPinned>> for QCellOwnerID
sourcefn from(owner: Pin<&QCellOwnerPinned>) -> Self
fn from(owner: Pin<&QCellOwnerPinned>) -> Self
Converts to this type from the input type.
impl Copy for QCellOwnerID
Auto Trait Implementations
impl RefUnwindSafe for QCellOwnerID
impl Send for QCellOwnerID
impl Sync for QCellOwnerID
impl Unpin for QCellOwnerID
impl UnwindSafe for QCellOwnerID
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more