[][src]Struct dync::Value

pub struct Value<B, V> where
    B: GetBytesMut
{ /* fields omitted */ }

Methods

impl<V> Value<Box<[u8]>, V>[src]

pub fn new<T: Any + DropBytes>(value: T) -> Value<Box<[u8]>, V> where
    V: VTable<T>, 
[src]

pub fn as_ref(&self) -> ValueRef<V>[src]

pub fn as_mut(&mut self) -> ValueMut<V>[src]

impl<B: GetBytes, V> Value<B, 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.

impl<V> Value<Box<[u8]>, V>[src]

pub fn downcast<T: 'static>(self) -> Option<Box<T>>[src]

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

impl<V> Value<usize, V>[src]

pub fn downcast<T: 'static>(self) -> Option<T>[src]

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

Trait Implementations

impl<V: HasClone> Clone for Value<Box<[u8]>, V>[src]

impl<B: GetBytesMut, V: HasDebug> Debug for Value<B, V>[src]

impl<B: GetBytesMut, V> Drop for Value<B, V>[src]

impl<B: GetBytesMut, V: HasPartialEq> Eq for Value<B, V>[src]

impl<B: GetBytesMut, V: HasHash> Hash for Value<B, V>[src]

impl<B: GetBytesMut, V: HasPartialEq> PartialEq<Value<B, V>> for Value<B, V>[src]

Auto Trait Implementations

impl<B, V> RefUnwindSafe for Value<B, V> where
    B: RefUnwindSafe,
    V: RefUnwindSafe

impl<B, V> Send for Value<B, V> where
    B: Send,
    V: Send + Sync

impl<B, V> Sync for Value<B, V> where
    B: Sync,
    V: Send + Sync

impl<B, V> Unpin for Value<B, V> where
    B: Unpin

impl<B, V> UnwindSafe for Value<B, V> where
    B: UnwindSafe,
    V: RefUnwindSafe

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> From<T> for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.