[][src]Struct dync::CopyValueMut

pub struct CopyValueMut<'a, V = ()> where
    V: ?Sized
{ /* fields omitted */ }

A generic mutable Copy value reference.

Implementations

impl<'a, V> CopyValueMut<'a, V>[src]

pub fn new<T: Elem>(typed: &'a mut T) -> CopyValueMut<'a, V> where
    V: VTable<T>, 
[src]

Create a new CopyValueMut from a typed mutable reference.

impl<'a, V: ?Sized> CopyValueMut<'a, V>[src]

pub fn size(&self) -> usize[src]

Get the size of the value pointed-to by this reference.

pub fn value_type_id(&self) -> TypeId[src]

Get the TypeId of the referenced value.

pub fn is<T: 'static>(&self) -> bool[src]

Returns true if this referenced value's type is the same as T.

pub fn copy(self, other: CopyValueRef<'a, V>) -> Option<Self>[src]

Copy value from other to self and return Self.

This function returns None if the values have different types.

pub fn swap(&mut self, other: &mut CopyValueMut<V>)[src]

Swap the values between other and self.

pub fn downcast<T: Elem>(self) -> Option<&'a mut T>[src]

Downcast this value reference into a borrowed T type. Return None if the downcast fails.

pub fn upcast<U: From<V>>(&mut self) -> CopyValueMut<U> where
    V: Clone
[src]

Trait Implementations

impl<'a, V> Debug for CopyValueMut<'a, V> where
    V: Debug + ?Sized
[src]

impl<'a, V: HasDrop> From<CopyValueMut<'a, V>> for CopyValueRef<'a, V>[src]

impl<'a, V: Any + Clone> From<CopyValueMut<'a, V>> for ValueMut<'a, (DropFn, V)>[src]

Auto Trait Implementations

impl<'a, V: ?Sized> RefUnwindSafe for CopyValueMut<'a, V> where
    V: RefUnwindSafe

impl<'a, V: ?Sized> Send for CopyValueMut<'a, V> where
    V: Send + Sync

impl<'a, V: ?Sized> Sync for CopyValueMut<'a, V> where
    V: Sync

impl<'a, V: ?Sized> Unpin for CopyValueMut<'a, V>

impl<'a, V = ()> !UnwindSafe for CopyValueMut<'a, V>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DebugBytes for T where
    T: 'static + Debug
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

impl<T> DropBytes for T where
    T: 'static, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.