[−][src]Struct dync::CopyValueRef
A generic value reference to a Copy
type.
Implementations
impl<'a, V> CopyValueRef<'a, V>
[src]
pub fn new<T: Elem>(typed: &'a T) -> CopyValueRef<'a, V> where
V: VTable<T>,
[src]
V: VTable<T>,
Create a new CopyValueRef
from a typed reference.
impl<'a, V: ?Sized> CopyValueRef<'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 downcast<T: Elem>(self) -> Option<&'a T>
[src]
Downcast this value reference into a borrowed T
type. Return None
if the downcast fails.
pub fn upcast<U: ?Sized + From<V>>(self) -> CopyValueRef<'a, U> where
V: Clone,
[src]
V: Clone,
pub fn upcast_ref<U: ?Sized + From<V>>(&self) -> CopyValueRef<U> where
V: Clone,
[src]
V: Clone,
Trait Implementations
impl<'a, V> Clone for CopyValueRef<'a, V> where
V: Clone + ?Sized,
[src]
V: Clone + ?Sized,
fn clone(&self) -> CopyValueRef<'a, V>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a, V> Debug for CopyValueRef<'a, V> where
V: Debug + ?Sized,
[src]
V: Debug + ?Sized,
impl<'a, V: ?Sized + 'a> Extend<CopyValueRef<'a, V>> for VecCopy<V>
[src]
fn extend<T: IntoIterator<Item = CopyValueRef<'a, V>>>(&mut self, iter: T)
[src]
impl<'a, V: HasDrop> From<CopyValueMut<'a, V>> for CopyValueRef<'a, V>
[src]
fn from(v: CopyValueMut<'a, V>) -> CopyValueRef<'a, V>
[src]
impl<'a, V: Any + Clone> From<CopyValueRef<'a, V>> for ValueRef<'a, (DropFn, V)>
[src]
impl<'a, V: Clone + ?Sized + 'a> FromIterator<CopyValueRef<'a, V>> for VecCopy<V>
[src]
fn from_iter<T: IntoIterator<Item = CopyValueRef<'a, V>>>(iter: T) -> Self
[src]
Auto Trait Implementations
impl<'a, V: ?Sized> RefUnwindSafe for CopyValueRef<'a, V> where
V: RefUnwindSafe,
V: RefUnwindSafe,
impl<'a, V: ?Sized> Send for CopyValueRef<'a, V> where
V: Send + Sync,
V: Send + Sync,
impl<'a, V: ?Sized> Sync for CopyValueRef<'a, V> where
V: Sync,
V: Sync,
impl<'a, V: ?Sized> Unpin for CopyValueRef<'a, V>
impl<'a, V: ?Sized> UnwindSafe for CopyValueRef<'a, V> where
V: RefUnwindSafe + UnwindSafe,
V: RefUnwindSafe + UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CloneBytes for T where
T: 'static + Clone,
[src]
T: 'static + Clone,
unsafe fn clone_bytes(&[MaybeUninit<u8>]) -> Box<[MaybeUninit<u8>]>
[src]
unsafe fn clone_from_bytes(&mut [MaybeUninit<u8>], &[MaybeUninit<u8>])
[src]
unsafe fn clone_into_raw_bytes(&[MaybeUninit<u8>], &mut [MaybeUninit<u8>])
[src]
impl<T> DebugBytes for T where
T: 'static + Debug,
[src]
T: 'static + Debug,
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,
impl<T> DropBytes for T where
T: 'static,
[src]
T: 'static,
unsafe fn drop_bytes(&mut [MaybeUninit<u8>])
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,