Algorithm

Trait Algorithm 

Source
pub trait Algorithm<META, META2> {
    // Required methods
    fn create() -> Self;
    fn is_unique(&self) -> bool;
    fn clone(&self);
    fn drop(&self) -> bool;
    fn try_into_other<T: ?Sized>(
        &self,
        inner: *mut FlexRcInner<META, META2, T>,
    ) -> Result<*mut FlexRcInner<META2, META, T>, *mut FlexRcInner<META, META2, T>>;
    fn try_to_other<T: ?Sized>(
        &self,
        inner: *mut FlexRcInner<META, META2, T>,
    ) -> Result<*mut FlexRcInner<META2, META, T>, *mut FlexRcInner<META, META2, T>>;
}

Required Methods§

Source

fn create() -> Self

Create and return new metadata

Source

fn is_unique(&self) -> bool

Returns true if this instance is the last one before final release of resources

Source

fn clone(&self)

Increment reference counters

Source

fn drop(&self) -> bool

Decrement reference counters and return true if storage should be deallocated

Source

fn try_into_other<T: ?Sized>( &self, inner: *mut FlexRcInner<META, META2, T>, ) -> Result<*mut FlexRcInner<META2, META, T>, *mut FlexRcInner<META, META2, T>>

Attempts to converts one inner type into another while consuming the other

Source

fn try_to_other<T: ?Sized>( &self, inner: *mut FlexRcInner<META, META2, T>, ) -> Result<*mut FlexRcInner<META2, META, T>, *mut FlexRcInner<META, META2, T>>

Attempts to converts one inner type into another but NOT consuming the other

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§