TempValue

Struct TempValue 

Source
pub struct TempValue<Op: Operation> { /* private fields */ }
Expand description

Temporary existing value in memory. Data will be erased with TempValue destruction.

Have internal &mut AnyVec.

May do some postponed actions on consumption/destruction.

Trait Implementations§

Source§

impl<Op: Operation> AnyValue for TempValue<Op>

Source§

fn value_typeid(&self) -> TypeId

Source§

fn downcast_ref<T: 'static>(&self) -> Option<&T>

Source§

fn downcast<T: 'static>(self) -> Option<T>
where Self: Sized,

Source§

impl<Op: Operation> AnyValueCloneable for TempValue<Op>
where Op::AnyVecPtr: IAnyVecPtr, <Op::AnyVecPtr as IAnyVecPtr>::Traits: Cloneable,

Source§

unsafe fn clone_into(&self, out: *mut u8)

Source§

fn lazy_clone(&self) -> LazyClone<'_, Self>
where Self: Sized,

Source§

impl<Op: Operation> AnyValueMut for TempValue<Op>

Source§

fn downcast_mut<T: 'static>(&mut self) -> Option<&mut T>

Source§

fn swap<Other: AnyValueMut>(&mut self, other: &mut Other)

Swaps underlying values. Read more
Source§

impl<Op: Operation> AnyValueSizeless for TempValue<Op>

Source§

type Type = <<Op as Operation>::AnyVecPtr as IAnyVecRawPtr>::Element

Concrete type, or Unknown Read more
Source§

fn as_bytes_ptr(&self) -> *const u8

Aligned address.
Source§

unsafe fn move_into<KnownType: 'static>(self, out: *mut u8, bytes_size: usize)

Move self into out. Read more
Source§

unsafe fn downcast_ref_unchecked<T>(&self) -> &T

Source§

unsafe fn downcast_unchecked<T: 'static>(self) -> T
where Self: Sized,

Source§

impl<Op: Operation> AnyValueSizelessMut for TempValue<Op>

Source§

fn as_bytes_mut_ptr(&mut self) -> *mut u8

Aligned address.
Source§

unsafe fn downcast_mut_unchecked<T>(&mut self) -> &mut T

Source§

impl<Op: Operation> AnyValueTypeless for TempValue<Op>

Source§

fn size(&self) -> usize

Aligned.
Source§

fn as_bytes(&self) -> &[u8]

Aligned.
Source§

impl<Op: Operation> AnyValueTypelessMut for TempValue<Op>

Source§

fn as_bytes_mut(&mut self) -> &mut [u8]

Source§

unsafe fn swap_unchecked<Other: AnyValueMut>(&mut self, other: &mut Other)

Source§

impl<Op: Operation> Drop for TempValue<Op>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<Op: Operation> Send for TempValue<Op>
where Op::AnyVecPtr: IAnyVecPtr, AnyVec<<Op::AnyVecPtr as IAnyVecPtr>::Traits, <Op::AnyVecPtr as IAnyVecRawPtr>::M>: Send,

Source§

impl<Op: Operation> Sync for TempValue<Op>
where Op::AnyVecPtr: IAnyVecPtr, AnyVec<<Op::AnyVecPtr as IAnyVecPtr>::Traits, <Op::AnyVecPtr as IAnyVecRawPtr>::M>: Sync,

Auto Trait Implementations§

§

impl<Op> Freeze for TempValue<Op>
where Op: Freeze,

§

impl<Op> RefUnwindSafe for TempValue<Op>
where Op: RefUnwindSafe,

§

impl<Op> Unpin for TempValue<Op>
where Op: Unpin,

§

impl<Op> UnwindSafe for TempValue<Op>
where Op: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> SatisfyTraits<dyn None> for T

Source§

impl<T> SatisfyTraits<dyn Send> for T
where T: Send,

Source§

impl<T> SatisfyTraits<dyn Sync + Send> for T
where T: Send + Sync,

Source§

impl<T> SatisfyTraits<dyn Sync> for T
where T: Sync,