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.
source§impl PartialEq for Property
impl PartialEq for Property
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)