Struct rust_cc::weak::Weakable

source ·
pub struct Weakable<T: ?Sized + Trace + 'static> { /* private fields */ }
Available on crate feature weak-ptr only.
Expand description

Enables to downgrade a Cc to a Weak pointer.

Implementations§

source§

impl<T: Trace + 'static> Weakable<T>

source

pub fn new(t: T) -> Weakable<T>

Creates a new Weakable.

Trait Implementations§

source§

impl<T: ?Sized + Trace + 'static> Deref for Weakable<T>

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<T: ?Sized + Trace + 'static> Drop for Weakable<T>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<T: ?Sized + Trace + 'static> Finalize for Weakable<T>

source§

fn finalize(&self)

The finalizer, which is called after an object becomes garbage and before droping it. Read more
source§

impl<T: ?Sized + Trace + 'static> Trace for Weakable<T>

source§

fn trace(&self, ctx: &mut Context<'_>)

Traces the contained Ccs. See Trace for more information.

Auto Trait Implementations§

§

impl<T> !Freeze for Weakable<T>

§

impl<T> !RefUnwindSafe for Weakable<T>

§

impl<T> !Send for Weakable<T>

§

impl<T> !Sync for Weakable<T>

§

impl<T> Unpin for Weakable<T>
where T: Unpin + ?Sized,

§

impl<T> !UnwindSafe for Weakable<T>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.