Struct roead::aamp::ParameterObject
source · pub struct ParameterObject(pub IndexMap<Name, Parameter, BuildHasherDefault<FxHasher>>);
Expand description
Parameter
object. This is essentially a dictionary of parameters.
Tuple Fields§
§0: IndexMap<Name, Parameter, BuildHasherDefault<FxHasher>>
Implementations§
source§impl ParameterObject
impl ParameterObject
sourcepub fn extend<I: IntoIterator<Item = (Name, Parameter)>>(&mut self, iter: I)
pub fn extend<I: IntoIterator<Item = (Name, Parameter)>>(&mut self, iter: I)
Insert multiple entries from an iterator.
sourcepub fn get<N: Into<Name>>(&self, key: N) -> Option<&Parameter>
pub fn get<N: Into<Name>>(&self, key: N) -> Option<&Parameter>
Get an entry value by name or hash.
sourcepub fn get_mut<N: Into<Name>>(&mut self, key: N) -> Option<&mut Parameter>
pub fn get_mut<N: Into<Name>>(&mut self, key: N) -> Option<&mut Parameter>
Get an entry value mutably by name or hash.
sourcepub fn entry<N: Into<Name>>(&mut self, key: N) -> Entry<'_, Name, Parameter>
pub fn entry<N: Into<Name>>(&mut self, key: N) -> Entry<'_, Name, Parameter>
Get a full entry by name or hash.
sourcepub fn iter_mut(&mut self) -> impl Iterator<Item = (&Name, &mut Parameter)>
pub fn iter_mut(&mut self) -> impl Iterator<Item = (&Name, &mut Parameter)>
Iterate entries mutably.
sourcepub fn iter_by_name(
&self
) -> impl Iterator<Item = (Result<&'static Cow<'static, str>, u32>, &Parameter)>
pub fn iter_by_name( &self ) -> impl Iterator<Item = (Result<&'static Cow<'static, str>, u32>, &Parameter)>
Iterate entries by name (this is potentially rather expensive,
as the name for each hash must be looked up from the default
name table). It returns a Result
for
each name, with the found name as the success value or the hash
as the error value.
This is only available with the yaml
feature.
source§impl ParameterObject
impl ParameterObject
sourcepub fn with_parameter<N: Into<Name>>(
self,
name: N,
parameter: Parameter
) -> ParameterObject
pub fn with_parameter<N: Into<Name>>( self, name: N, parameter: Parameter ) -> ParameterObject
Builder-like method to add a new parameter.
sourcepub fn with_parameters<N: Into<Name>, I: IntoIterator<Item = (N, Parameter)>>(
self,
iter: I
) -> ParameterObject
pub fn with_parameters<N: Into<Name>, I: IntoIterator<Item = (N, Parameter)>>( self, iter: I ) -> ParameterObject
Builder-like method to add multiple parameters from an iterator.
Trait Implementations§
source§impl Clone for ParameterObject
impl Clone for ParameterObject
source§fn clone(&self) -> ParameterObject
fn clone(&self) -> ParameterObject
Returns a copy 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 Debug for ParameterObject
impl Debug for ParameterObject
source§impl Default for ParameterObject
impl Default for ParameterObject
source§fn default() -> ParameterObject
fn default() -> ParameterObject
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for ParameterObject
impl<'de> Deserialize<'de> for ParameterObject
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<N: Into<Name>> FromIterator<(N, Parameter)> for ParameterObject
impl<N: Into<Name>> FromIterator<(N, Parameter)> for ParameterObject
source§impl PartialEq for ParameterObject
impl PartialEq for ParameterObject
source§fn eq(&self, other: &ParameterObject) -> bool
fn eq(&self, other: &ParameterObject) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ParameterObject
impl Serialize for ParameterObject
impl Eq for ParameterObject
impl StructuralPartialEq for ParameterObject
Auto Trait Implementations§
impl Freeze for ParameterObject
impl RefUnwindSafe for ParameterObject
impl Send for ParameterObject
impl Sync for ParameterObject
impl Unpin for ParameterObject
impl UnwindSafe for ParameterObject
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.