pub struct AgentConfigs(/* private fields */);Implementations§
Source§impl AgentConfigs
impl AgentConfigs
pub fn new() -> Self
pub fn set(&mut self, key: String, value: AgentValue)
pub fn contains_key(&self, key: &str) -> bool
pub fn get(&self, key: &str) -> Result<&AgentValue, AgentError>
pub fn get_bool(&self, key: &str) -> Result<bool, AgentError>
pub fn get_bool_or(&self, key: &str, default: bool) -> bool
pub fn get_bool_or_default(&self, key: &str) -> bool
pub fn get_integer(&self, key: &str) -> Result<i64, AgentError>
pub fn get_integer_or(&self, key: &str, default: i64) -> i64
pub fn get_integer_or_default(&self, key: &str) -> i64
pub fn get_number(&self, key: &str) -> Result<f64, AgentError>
pub fn get_number_or(&self, key: &str, default: f64) -> f64
pub fn get_number_or_default(&self, key: &str) -> f64
pub fn get_string(&self, key: &str) -> Result<String, AgentError>
pub fn get_string_or(&self, key: &str, default: impl Into<String>) -> String
pub fn get_string_or_default(&self, key: &str) -> String
pub fn get_array(&self, key: &str) -> Result<&Vector<AgentValue>, AgentError>
pub fn get_array_or<'a>( &'a self, key: &str, default: &'a Vector<AgentValue>, ) -> &'a Vector<AgentValue>
pub fn get_array_or_default(&self, key: &str) -> Vector<AgentValue>
pub fn get_object( &self, key: &str, ) -> Result<&AgentValueMap<String, AgentValue>, AgentError>
pub fn get_object_or<'a>( &'a self, key: &str, default: &'a AgentValueMap<String, AgentValue>, ) -> &'a AgentValueMap<String, AgentValue>
pub fn get_object_or_default( &self, key: &str, ) -> AgentValueMap<String, AgentValue>
Trait Implementations§
Source§impl Clone for AgentConfigs
impl Clone for AgentConfigs
Source§fn clone(&self) -> AgentConfigs
fn clone(&self) -> AgentConfigs
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 Debug for AgentConfigs
impl Debug for AgentConfigs
Source§impl Default for AgentConfigs
impl Default for AgentConfigs
Source§fn default() -> AgentConfigs
fn default() -> AgentConfigs
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AgentConfigs
impl<'de> Deserialize<'de> for AgentConfigs
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<'a> FromIterator<(&'a String, &'a AgentValue)> for AgentConfigs
impl<'a> FromIterator<(&'a String, &'a AgentValue)> for AgentConfigs
Source§fn from_iter<T: IntoIterator<Item = (&'a String, &'a AgentValue)>>(
iter: T,
) -> Self
fn from_iter<T: IntoIterator<Item = (&'a String, &'a AgentValue)>>( iter: T, ) -> Self
Creates a value from an iterator. Read more
Source§impl FromIterator<(String, AgentValue)> for AgentConfigs
impl FromIterator<(String, AgentValue)> for AgentConfigs
Source§fn from_iter<T: IntoIterator<Item = (String, AgentValue)>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = (String, AgentValue)>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl<'a> IntoIterator for &'a AgentConfigs
impl<'a> IntoIterator for &'a AgentConfigs
Source§impl IntoIterator for AgentConfigs
impl IntoIterator for AgentConfigs
Auto Trait Implementations§
impl Freeze for AgentConfigs
impl RefUnwindSafe for AgentConfigs
impl Send for AgentConfigs
impl Sync for AgentConfigs
impl Unpin for AgentConfigs
impl UnwindSafe for AgentConfigs
Blanket Implementations§
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
Source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
Convert the source color to the destination color using the specified
method
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford
method by default
Source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
Source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
Source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
Source§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
Source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
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, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
Source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
Source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
Approximate the subject to a given type with the default scheme.
Source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
Approximate the subject to a given type with a specific scheme.
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, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
Source§fn into_color(self) -> U
fn into_color(self) -> U
Convert into T with values clamped to the color defined bounds Read more
Source§impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
Source§fn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
Convert into T. The resulting color might be invalid in its color space Read more
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 moreSource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.Source§impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
Source§fn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
Convert into T, returning ok if the color is inside of its defined
range, otherwise an
OutOfBounds error is returned which contains
the unclamped color. Read more