pub enum DIFValueContainer {
Value(DIFValue),
Reference(PointerAddress),
}Expand description
Holder for either a value or a reference to a value in DIF
Variants§
Value(DIFValue)
Reference(PointerAddress)
Implementations§
Source§impl DIFValueContainer
impl DIFValueContainer
Sourcepub fn to_value_container(
&self,
memory: &RefCell<Memory>,
) -> Result<ValueContainer, DIFReferenceNotFoundError>
pub fn to_value_container( &self, memory: &RefCell<Memory>, ) -> Result<ValueContainer, DIFReferenceNotFoundError>
Converts the DIFValueContainer into a ValueContainer, resolving references using the provided memory. Returns an error if a reference cannot be resolved.
Source§impl DIFValueContainer
impl DIFValueContainer
pub fn from_value_container(value_container: &ValueContainer) -> Self
Trait Implementations§
Source§impl Clone for DIFValueContainer
impl Clone for DIFValueContainer
Source§fn clone(&self) -> DIFValueContainer
fn clone(&self) -> DIFValueContainer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl DIFConvertible for DIFValueContainer
impl DIFConvertible for DIFValueContainer
Source§impl Debug for DIFValueContainer
impl Debug for DIFValueContainer
Source§impl<'de> Deserialize<'de> for DIFValueContainer
impl<'de> Deserialize<'de> for DIFValueContainer
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&DIFValue> for DIFValueContainer
impl From<&DIFValue> for DIFValueContainer
Source§impl From<DIFValue> for DIFValueContainer
impl From<DIFValue> for DIFValueContainer
Source§impl From<DIFValueContainer> for DIFKey
impl From<DIFValueContainer> for DIFKey
Source§fn from(v: DIFValueContainer) -> Self
fn from(v: DIFValueContainer) -> Self
Converts to this type from the input type.
Source§impl From<PointerAddress> for DIFValueContainer
impl From<PointerAddress> for DIFValueContainer
Source§fn from(ptr: PointerAddress) -> Self
fn from(ptr: PointerAddress) -> Self
Converts to this type from the input type.
Source§impl PartialEq for DIFValueContainer
impl PartialEq for DIFValueContainer
Source§impl Serialize for DIFValueContainer
impl Serialize for DIFValueContainer
impl StructuralPartialEq for DIFValueContainer
Auto Trait Implementations§
impl Freeze for DIFValueContainer
impl RefUnwindSafe for DIFValueContainer
impl Send for DIFValueContainer
impl Sync for DIFValueContainer
impl Unpin for DIFValueContainer
impl UnsafeUnpin for DIFValueContainer
impl UnwindSafe for DIFValueContainer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more