pub struct RawStateEvent<'a> {
pub status: ItemStatus,
pub value: ValueOption<'a>,
pub force: Force,
pub t: Option<f64>,
pub status_compare: Option<ItemStatus>,
pub value_compare: ValueOption<'a>,
pub status_else: Option<ItemStatus>,
pub value_else: ValueOption<'a>,
pub on_modified: Option<OnModified<'a>>,
}
Expand description
Submitted by services via the bus for local items
Fields§
§status: ItemStatus
§value: ValueOption<'a>
§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: ValueOption<'a>
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: ValueOption<'a>
if comparison is used and unequal, set item value (optional)
on_modified: Option<OnModified<'a>>
If the item is modified, OnModified rules are applied
Implementations§
Source§impl<'a> RawStateEvent<'a>
impl<'a> RawStateEvent<'a>
pub fn new(status: ItemStatus, value: &'a 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<'a> Clone for RawStateEvent<'a>
impl<'a> Clone for RawStateEvent<'a>
Source§fn clone(&self) -> RawStateEvent<'a>
fn clone(&self) -> RawStateEvent<'a>
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<'a> Debug for RawStateEvent<'a>
impl<'a> Debug for RawStateEvent<'a>
Source§impl<'a> Default for RawStateEvent<'a>
impl<'a> Default for RawStateEvent<'a>
Source§fn default() -> RawStateEvent<'a>
fn default() -> RawStateEvent<'a>
Returns the “default value” for a type. Read more
Source§impl<'a> From<RawStateBulkEvent<'a>> for RawStateEvent<'a>
impl<'a> From<RawStateBulkEvent<'a>> for RawStateEvent<'a>
Source§fn from(r: RawStateBulkEvent<'a>) -> Self
fn from(r: RawStateBulkEvent<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> PartialEq for RawStateEvent<'a>
impl<'a> PartialEq for RawStateEvent<'a>
Source§impl<'a> Serialize for RawStateEvent<'a>
impl<'a> Serialize for RawStateEvent<'a>
impl Eq for RawStateEvent<'_>
impl<'a> StructuralPartialEq for RawStateEvent<'a>
Auto Trait Implementations§
impl<'a> Freeze for RawStateEvent<'a>
impl<'a> RefUnwindSafe for RawStateEvent<'a>
impl<'a> Send for RawStateEvent<'a>
impl<'a> Sync for RawStateEvent<'a>
impl<'a> Unpin for RawStateEvent<'a>
impl<'a> UnwindSafe for RawStateEvent<'a>
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