[−][src]Struct dync::ValueMut
A generic mutable value reference into a buffer.
Methods
impl<'a, V> ValueMut<'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 new<T: Any>(typed: &'a mut T) -> ValueMut<'a, V> where
V: VTable<T>, [src]
V: VTable<T>,
Create a new ValueRef from a typed reference.
pub fn swap<'b>(&mut self, other: &mut ValueMut<'b, V>)[src]
Swap the values between other and self.
pub fn clone_from<'b>(&mut self, other: impl Into<ValueRef<'b, V>>) where
V: HasClone + 'b, [src]
V: HasClone + 'b,
Clone other into self.
This function will call drop on any values stored in self.
pub fn downcast<T: 'static>(self) -> Option<&'a mut T>[src]
Downcast this value reference into a borrowed T type. Return None if the downcast fails.
Trait Implementations
impl<'a, V: HasDebug> Debug for ValueMut<'a, V>[src]
impl<'a, V: HasEq> Eq for ValueMut<'a, V>[src]
impl<'a, V> From<ValueMut<'a, V>> for ValueRef<'a, V>[src]
impl<'a, V: HasPartialEq> PartialEq<ValueMut<'a, V>> for ValueMut<'a, V>[src]
Auto Trait Implementations
impl<'a, V> RefUnwindSafe for ValueMut<'a, V> where
V: RefUnwindSafe,
V: RefUnwindSafe,
impl<'a, V> Send for ValueMut<'a, V> where
V: Send + Sync,
V: Send + Sync,
impl<'a, V> Sync for ValueMut<'a, V> where
V: Sync,
V: Sync,
impl<'a, V> Unpin for ValueMut<'a, V>
impl<'a, V> !UnwindSafe for ValueMut<'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> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<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>,