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
👎Deprecated
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>
pub fn get_value_as<F, T>(&self, converter: F) -> Option<T>
Returns the value as a certain type
Sourcepub fn get_param_as<F, T>(&self, key: &str, converter: F) -> Option<T>
pub fn get_param_as<F, T>(&self, key: &str, converter: F) -> 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.
impl Eq for Property
impl StructuralPartialEq for Property
Auto Trait Implementations§
impl Freeze for Property
impl RefUnwindSafe for Property
impl Send for Property
impl Sync for Property
impl Unpin for Property
impl UnwindSafe for Property
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