pub enum MappingOrArray {
Array(Array),
Mapping(RealMapping),
}Variants§
Array(Array)
Mapping(RealMapping)
Implementations§
Source§impl MappingOrArray
impl MappingOrArray
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn keys<'a>(&'a self) -> impl Iterator<Item = Cow<'a, MapKey>>
pub fn sum(&self) -> Result<Numeric, cerr>
pub fn value_array(&self) -> Array
pub fn get(&self, key: &MapKey) -> Result<&RuntimeValue, cerr>
pub fn to_btreemap(&self) -> BTreeMap<MapKey, Result<RuntimeValue, cerr>>
Trait Implementations§
Source§impl Clone for MappingOrArray
impl Clone for MappingOrArray
Source§fn clone(&self) -> MappingOrArray
fn clone(&self) -> MappingOrArray
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MappingOrArray
impl Debug for MappingOrArray
Source§impl<'de> Deserialize<'de> for MappingOrArray
impl<'de> Deserialize<'de> for MappingOrArray
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<Array> for MappingOrArray
impl From<Array> for MappingOrArray
Source§impl From<MappingOrArray> for RuntimeValue
impl From<MappingOrArray> for RuntimeValue
Source§fn from(value: MappingOrArray) -> Self
fn from(value: MappingOrArray) -> Self
Converts to this type from the input type.
Source§impl From<RealMapping> for MappingOrArray
impl From<RealMapping> for MappingOrArray
Source§fn from(value: RealMapping) -> Self
fn from(value: RealMapping) -> Self
Converts to this type from the input type.
Source§impl PartialEq for MappingOrArray
impl PartialEq for MappingOrArray
Source§fn eq(&self, other: &MappingOrArray) -> bool
fn eq(&self, other: &MappingOrArray) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for MappingOrArray
impl PartialOrd for MappingOrArray
Source§impl Serialize for MappingOrArray
impl Serialize for MappingOrArray
impl StructuralPartialEq for MappingOrArray
Auto Trait Implementations§
impl Freeze for MappingOrArray
impl RefUnwindSafe for MappingOrArray
impl Send for MappingOrArray
impl Sync for MappingOrArray
impl Unpin for MappingOrArray
impl UnsafeUnpin for MappingOrArray
impl UnwindSafe for MappingOrArray
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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