pub struct StateField {
pub kind: String,
pub initial: Option<Value>,
}Expand description
One declared field.
Fields§
§kind: StringThe field’s type: int, float, bool, string, map, list, json.
initial: Option<Value>The initial value; absent means the type’s zero (or null for json).
Implementations§
Source§impl StateField
impl StateField
Sourcepub fn initial_value(&self) -> Value
pub fn initial_value(&self) -> Value
The value a reset returns to: the declared initial, else the type’s zero.
Trait Implementations§
Source§impl Clone for StateField
impl Clone for StateField
Source§impl Debug for StateField
impl Debug for StateField
Source§impl<'de> Deserialize<'de> for StateField
impl<'de> Deserialize<'de> for StateField
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
Auto Trait Implementations§
impl Forget for StateField
impl Freeze for StateField
impl RefUnwindSafe for StateField
impl Send for StateField
impl Sync for StateField
impl Unpin for StateField
impl UnsafeUnpin for StateField
impl UnwindSafe for StateField
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