pub struct RawStateEventOwned {
pub status: ItemStatus,
pub value: ValueOptionOwned,
pub force: Force,
pub t: Option<f64>,
pub status_compare: Option<ItemStatus>,
pub value_compare: ValueOptionOwned,
pub status_else: Option<ItemStatus>,
pub value_else: ValueOptionOwned,
pub on_modified: Option<OnModifiedOwned>,
}
Expand description
Submitted by services via the bus for local items
Fields§
§status: ItemStatus
§value: ValueOptionOwned
§force: Force
§t: Option<f64>
Override the time of the event
status_compare: Option<ItemStatus>
Compare the status with the current status (optional)
value_compare: ValueOptionOwned
Compare the value with the current value (optional)
status_else: Option<ItemStatus>
if comparison is used and unequal, set item status. In case if status is not specified,
crate::ITEM_STATUS_ERROR
is used
value_else: ValueOptionOwned
if comparison is used and unequal, set item value (optional)
on_modified: Option<OnModifiedOwned>
If the item is modified, OnModified rules are applied
Implementations§
Source§impl RawStateEventOwned
impl RawStateEventOwned
pub fn new(status: ItemStatus, value: Value) -> Self
pub fn new0(status: ItemStatus) -> Self
pub fn force(self) -> Self
pub fn force_update(self) -> Self
pub fn at(self, t: f64) -> Self
Trait Implementations§
Source§impl Clone for RawStateEventOwned
impl Clone for RawStateEventOwned
Source§fn clone(&self) -> RawStateEventOwned
fn clone(&self) -> RawStateEventOwned
Returns a copy 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 RawStateEventOwned
impl Debug for RawStateEventOwned
Source§impl Default for RawStateEventOwned
impl Default for RawStateEventOwned
Source§fn default() -> RawStateEventOwned
fn default() -> RawStateEventOwned
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RawStateEventOwned
impl<'de> Deserialize<'de> for RawStateEventOwned
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 From<RawStateBulkEventOwned> for RawStateEventOwned
impl From<RawStateBulkEventOwned> for RawStateEventOwned
Source§fn from(r: RawStateBulkEventOwned) -> Self
fn from(r: RawStateBulkEventOwned) -> Self
Converts to this type from the input type.
Source§impl PartialEq for RawStateEventOwned
impl PartialEq for RawStateEventOwned
Source§impl Serialize for RawStateEventOwned
impl Serialize for RawStateEventOwned
impl Eq for RawStateEventOwned
impl StructuralPartialEq for RawStateEventOwned
Auto Trait Implementations§
impl Freeze for RawStateEventOwned
impl RefUnwindSafe for RawStateEventOwned
impl Send for RawStateEventOwned
impl Sync for RawStateEventOwned
impl Unpin for RawStateEventOwned
impl UnwindSafe for RawStateEventOwned
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more