Struct SendWeakRef
pub struct SendWeakRef<T>(/* private fields */)
where
T: ObjectType;Expand description
A weak reference to the object it was created for that can be sent to
different threads even for object types that don’t implement Send.
Trying to upgrade the weak reference from another thread than the one where it was created on will panic but dropping or cloning can be done safely from any thread.
Implementations§
§impl<T> SendWeakRef<T>where
T: ObjectType,
impl<T> SendWeakRef<T>where
T: ObjectType,
pub fn into_weak_ref(self) -> WeakRef<T>
Trait Implementations§
§impl<T> Clone for SendWeakRef<T>where
T: ObjectType,
impl<T> Clone for SendWeakRef<T>where
T: ObjectType,
§fn clone(&self) -> SendWeakRef<T>
fn clone(&self) -> SendWeakRef<T>
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 more§impl<T> Debug for SendWeakRef<T>where
T: Debug + ObjectType,
impl<T> Debug for SendWeakRef<T>where
T: Debug + ObjectType,
§impl<T> Default for SendWeakRef<T>where
T: ObjectType,
impl<T> Default for SendWeakRef<T>where
T: ObjectType,
§fn default() -> SendWeakRef<T>
fn default() -> SendWeakRef<T>
Returns the “default value” for a type. Read more
§impl<T> Deref for SendWeakRef<T>where
T: ObjectType,
impl<T> Deref for SendWeakRef<T>where
T: ObjectType,
§impl<T> From<WeakRef<T>> for SendWeakRef<T>where
T: ObjectType,
impl<T> From<WeakRef<T>> for SendWeakRef<T>where
T: ObjectType,
§fn from(v: WeakRef<T>) -> SendWeakRef<T>
fn from(v: WeakRef<T>) -> SendWeakRef<T>
Converts to this type from the input type.
§impl<T> Property for SendWeakRef<T>
impl<T> Property for SendWeakRef<T>
§impl<T> PropertyGet for SendWeakRef<T>
impl<T> PropertyGet for SendWeakRef<T>
§impl<T> PropertySet for SendWeakRef<T>
impl<T> PropertySet for SendWeakRef<T>
type SetValue = Option<T>
fn set(&self, v: <SendWeakRef<T> as PropertySet>::SetValue)
impl<T> Send for SendWeakRef<T>where
T: ObjectType,
impl<T> Sync for SendWeakRef<T>where
T: ObjectType,
Auto Trait Implementations§
impl<T> Freeze for SendWeakRef<T>
impl<T> RefUnwindSafe for SendWeakRef<T>where
T: RefUnwindSafe,
impl<T> Unpin for SendWeakRef<T>
impl<T> UnwindSafe for SendWeakRef<T>where
T: RefUnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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 more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.