Struct StateProperty
#[non_exhaustive]pub struct StateProperty {
pub name: String,
pub values: Vec<String>,
}Expand description
One property and its legal values in a state definition.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringProperty name.
values: Vec<String>Legal serialized values.
Implementations§
§impl StateProperty
impl StateProperty
pub fn new(name: String, values: Vec<String>) -> StateProperty
pub fn new(name: String, values: Vec<String>) -> StateProperty
Construct a definition entry from a property name and legal values.
Trait Implementations§
§impl Clone for StateProperty
impl Clone for StateProperty
§fn clone(&self) -> StateProperty
fn clone(&self) -> StateProperty
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for StateProperty
impl Debug for StateProperty
impl Eq for StateProperty
§impl PartialEq for StateProperty
impl PartialEq for StateProperty
impl StructuralPartialEq for StateProperty
Auto Trait Implementations§
impl Freeze for StateProperty
impl RefUnwindSafe for StateProperty
impl Send for StateProperty
impl Sync for StateProperty
impl Unpin for StateProperty
impl UnsafeUnpin for StateProperty
impl UnwindSafe for StateProperty
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