[−][src]Struct dync::Value
Implementations
impl<V: HasDrop> Value<MaybeUninit<usize>, V>
[src]
pub fn try_new<T: Any + DropBytes>(
value: T
) -> Option<Value<MaybeUninit<usize>, V>> where
V: VTable<T>,
[src]
value: T
) -> Option<Value<MaybeUninit<usize>, V>> where
V: VTable<T>,
pub fn new<T: Any + DropBytes>(value: T) -> Value<MaybeUninit<usize>, V> where
V: VTable<T>,
[src]
V: VTable<T>,
This function will panic if the given type does not fit into a usize
.
impl<V: ?Sized + HasDrop> Value<MaybeUninit<usize>, V>
[src]
pub fn upcast<U: HasDrop + From<V>>(self) -> SmallValue<U> where
V: Clone,
[src]
V: Clone,
pub fn into_raw_parts(self) -> (MaybeUninit<usize>, TypeId, Ptr<V>)
[src]
Convert this value into its destructured parts.
The caller must insure that the memory allocated by the returned bytes is freed.
impl<V: HasDrop> Value<Box<[MaybeUninit<u8>]>, V>
[src]
pub fn new<T: Any + DropBytes>(value: T) -> Value<Box<[MaybeUninit<u8>]>, V> where
V: VTable<T>,
[src]
V: VTable<T>,
impl<V: ?Sized + HasDrop> Value<Box<[MaybeUninit<u8>]>, V>
[src]
pub fn upcast<U: HasDrop + From<V>>(self) -> BoxValue<U> where
V: Clone,
[src]
V: Clone,
pub fn into_raw_parts(self) -> (Box<[MaybeUninit<u8>]>, TypeId, Ptr<V>)
[src]
Convert this value into its destructured parts.
The caller must insure that the memory allocated by the returned bytes is freed.
impl<B: GetBytesMut, V: ?Sized + HasDrop> Value<B, V>
[src]
impl<B: GetBytesMut, V: ?Sized + HasDrop> 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: ?Sized + HasDrop> Value<Box<[MaybeUninit<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: ?Sized + HasDrop> Value<MaybeUninit<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: ?Sized + Clone + HasClone + HasDrop> Clone for Value<MaybeUninit<usize>, V>
[src]
fn clone(&self) -> Value<MaybeUninit<usize>, V>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<V: ?Sized + Clone + HasClone + HasDrop> Clone for Value<Box<[MaybeUninit<u8>]>, V>
[src]
fn clone(&self) -> Value<Box<[MaybeUninit<u8>]>, V>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<B: GetBytesMut, V: ?Sized + HasDebug + HasDrop> Debug for Value<B, V>
[src]
impl<B: GetBytesMut, V: ?Sized + HasDrop> Drop for Value<B, V>
[src]
impl<B: GetBytesMut, V: ?Sized + HasDrop + HasPartialEq> Eq for Value<B, V>
[src]
impl<'a, B: GetBytesMut, V: Clone + HasDrop> From<&'a Value<B, V>> for Meta<Ptr<V>>
[src]
impl<'a, B: GetBytesMut, V: ?Sized> From<&'a Value<B, V>> for ValueRef<'a, V> where
B: GetBytesRef,
V: Clone + HasDrop,
[src]
B: GetBytesRef,
V: Clone + HasDrop,
impl<B: GetBytesMut, V: ?Sized + HasDrop + HasHash> Hash for Value<B, 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<B: GetBytesMut, V: ?Sized + HasDrop + HasPartialEq> PartialEq<Value<B, V>> for Value<B, V>
[src]
fn eq(&self, other: &Self) -> bool
[src]
Panics
This function panics if the types of the two operands don't match.
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<B: GetBytesMut, V: ?Sized + HasDrop + HasSend> Send for Value<B, V>
[src]
impl<B: GetBytesMut, V: ?Sized + HasDrop + HasSync> Sync for Value<B, V>
[src]
Auto Trait Implementations
impl<B, V: ?Sized> RefUnwindSafe for Value<B, V> where
B: RefUnwindSafe,
V: RefUnwindSafe,
B: RefUnwindSafe,
V: RefUnwindSafe,
impl<B, V: ?Sized> Unpin for Value<B, V> where
B: Unpin,
B: Unpin,
impl<B, V: ?Sized> UnwindSafe for Value<B, V> where
B: UnwindSafe,
V: UnwindSafe,
B: UnwindSafe,
V: 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> 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> 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>,