pub struct QCellOwnerID(/* private fields */);
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§
Source§impl 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§
Source§impl Clone for QCellOwnerID
impl Clone for QCellOwnerID
Source§fn clone(&self) -> QCellOwnerID
fn clone(&self) -> QCellOwnerID
Returns a copy 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 moreSource§impl From<&QCellOwner> for QCellOwnerID
impl From<&QCellOwner> for QCellOwnerID
Source§fn from(owner: &QCellOwner) -> Self
fn from(owner: &QCellOwner) -> Self
Converts to this type from the input type.
Source§impl From<&QCellOwnerSeq> for QCellOwnerID
impl From<&QCellOwnerSeq> for QCellOwnerID
Source§fn from(owner: &QCellOwnerSeq) -> Self
fn from(owner: &QCellOwnerSeq) -> Self
Converts to this type from the input type.
Source§impl From<Pin<&QCellOwnerPinned>> for QCellOwnerID
impl From<Pin<&QCellOwnerPinned>> for QCellOwnerID
Source§fn from(owner: Pin<&QCellOwnerPinned>) -> Self
fn from(owner: Pin<&QCellOwnerPinned>) -> Self
Converts to this type from the input type.
Source§impl Hash for QCellOwnerID
impl Hash for QCellOwnerID
Source§impl PartialEq for QCellOwnerID
impl PartialEq for QCellOwnerID
impl Copy for QCellOwnerID
impl Eq for QCellOwnerID
impl StructuralPartialEq for QCellOwnerID
Auto Trait Implementations§
impl Freeze for QCellOwnerID
impl RefUnwindSafe for QCellOwnerID
impl Send for QCellOwnerID
impl Sync for QCellOwnerID
impl Unpin for QCellOwnerID
impl UnwindSafe for QCellOwnerID
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