pub struct StatesEvent { /* private fields */ }
Expand description
States definition
Implementations§
Source§impl StatesEvent
impl StatesEvent
Sourcepub const fn new(
states: Value,
timestamp: u64,
sub_devices: Vec<SubDevice>,
) -> Self
pub const fn new( states: Value, timestamp: u64, sub_devices: Vec<SubDevice>, ) -> Self
Create a new StatesEvent
Sourcepub const fn from_states(states: Value) -> Self
pub const fn from_states(states: Value) -> Self
Create a new StatesEvent
with default timestamp and no sub-devices.
Sourcepub const fn from_states_timestamp(states: Value, timestamp: u64) -> Self
pub const fn from_states_timestamp(states: Value, timestamp: u64) -> Self
Create a new StatesEvent
with custom timestamp and no sub-devices.
Trait Implementations§
Source§impl Clone for StatesEvent
impl Clone for StatesEvent
Source§fn clone(&self) -> StatesEvent
fn clone(&self) -> StatesEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for StatesEvent
impl Debug for StatesEvent
Source§impl<'de> Deserialize<'de> for StatesEvent
impl<'de> Deserialize<'de> for StatesEvent
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
Source§impl Hash for StatesEvent
impl Hash for StatesEvent
Source§impl PartialEq for StatesEvent
impl PartialEq for StatesEvent
Source§impl Serialize for StatesEvent
impl Serialize for StatesEvent
impl Eq for StatesEvent
impl StructuralPartialEq for StatesEvent
Auto Trait Implementations§
impl Freeze for StatesEvent
impl RefUnwindSafe for StatesEvent
impl Send for StatesEvent
impl Sync for StatesEvent
impl Unpin for StatesEvent
impl UnwindSafe for StatesEvent
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