[−][src]Struct dync::CopyValueMut
A generic mutable Copy value reference.
Implementations
impl<'a, V> CopyValueMut<'a, V>[src]
pub fn new<T: CopyElem>(typed: &'a mut T) -> CopyValueMut<'a, V> where
V: VTable<T>, [src]
V: VTable<T>,
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 value_alignment(&self) -> usize[src]
Get the alignment 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: CopyElem>(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]
V: Clone,
Trait Implementations
impl<'a, V: ?Sized + HasDebug> Debug for CopyValueMut<'a, V>[src]
impl<'a, V: ?Sized + HasEq> Eq for CopyValueMut<'a, V>[src]
impl<'a, V> 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<CopyValueMut<'a, V>> for ValueMut<'a, (DropFn, V)>[src]
impl<'a, V: ?Sized + HasHash> Hash for CopyValueMut<'a, V>[src]
fn hash<H: Hasher>(&self, state: &mut H)[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl<'a, V: ?Sized + HasPartialEq> PartialEq<CopyValueMut<'a, V>> for CopyValueMut<'a, V>[src]
impl<'a, V: ?Sized + HasSend> Send for CopyValueMut<'a, V>[src]
impl<'a, V: ?Sized + HasSync> Sync for CopyValueMut<'a, V>[src]
Auto Trait Implementations
impl<'a, V: ?Sized> RefUnwindSafe for CopyValueMut<'a, V> where
V: RefUnwindSafe,
V: RefUnwindSafe,
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]
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> 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> HashBytes for T where
T: 'static + Hash, [src]
T: 'static + Hash,
unsafe fn hash_bytes(&[MaybeUninit<u8>], &mut dyn Hasher)[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> PartialEqBytes for T where
T: 'static + PartialEq<T>, [src]
T: 'static + PartialEq<T>,
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>,