pub struct Property { /* private fields */ }
Expand description
key-value pairs inside of Component
s
Implementations§
source§impl Property
impl Property
sourcepub fn new_pre_alloc(key: String, val: String) -> Self
pub fn new_pre_alloc(key: String, val: String) -> Self
if you already have String
s I’ll gladly take
sourcepub fn from_array<P: Into<Property>, const N: usize>(
array: [P; N]
) -> Vec<Property>
pub fn from_array<P: Into<Property>, const N: usize>( array: [P; N] ) -> Vec<Property>
Produces a Vec
of Property
from an array of other types.
sourcepub fn value_type(&self) -> Option<ValueType>
pub fn value_type(&self) -> Option<ValueType>
Returns the VALUE
parameter, if any is specified.
sourcepub fn get_value_as<F, T>(&self, converter: F) -> Option<T>where
F: Fn(&str) -> Option<T>,
pub fn get_value_as<F, T>(&self, converter: F) -> Option<T>where F: Fn(&str) -> Option<T>,
Returns the value as a certain type
sourcepub fn get_param_as<F, T>(&self, key: &str, converter: F) -> Option<T>where
F: Fn(&str) -> Option<T>,
pub fn get_param_as<F, T>(&self, key: &str, converter: F) -> Option<T>where F: Fn(&str) -> Option<T>,
Returns the value of a parameter as a certain type
sourcepub fn append_parameter<I: Into<Parameter>>(
&mut self,
into_parameter: I
) -> &mut Self
pub fn append_parameter<I: Into<Parameter>>( &mut self, into_parameter: I ) -> &mut Self
Appends a new parameter.
sourcepub fn add_parameter(&mut self, key: &str, val: &str) -> &mut Self
pub fn add_parameter(&mut self, key: &str, val: &str) -> &mut Self
Creates and appends a parameter.
Trait Implementations§
source§impl From<EventStatus> for Property
impl From<EventStatus> for Property
source§fn from(val: EventStatus) -> Self
fn from(val: EventStatus) -> Self
Converts to this type from the input type.
source§impl From<TodoStatus> for Property
impl From<TodoStatus> for Property
source§fn from(val: TodoStatus) -> Self
fn from(val: TodoStatus) -> Self
Converts to this type from the input type.