pub struct NeedsModelNotices { /* private fields */ }Expand description
Who was told they need a model while none is connected: one notice per automation, across restarts, until a model is connected.
Implementations§
Source§impl NeedsModelNotices
impl NeedsModelNotices
Sourcepub async fn first<S: SettingsStore + ?Sized>(
&self,
store: &S,
name: &str,
) -> bool
pub async fn first<S: SettingsStore + ?Sized>( &self, store: &S, name: &str, ) -> bool
Record that name is told it needs a model: true the first time
since a model was last connected, even across restarts.
Sourcepub async fn clear<S: SettingsStore + ?Sized>(&self, store: &S)
pub async fn clear<S: SettingsStore + ?Sized>(&self, store: &S)
A model is connected: forget who was told, so a model removed later tells each automation again. Writes only when something was recorded.
Auto Trait Implementations§
impl !Freeze for NeedsModelNotices
impl Forget for NeedsModelNotices
impl Move for NeedsModelNotices
impl RefUnwindSafe for NeedsModelNotices
impl Send for NeedsModelNotices
impl Sync for NeedsModelNotices
impl Unpin for NeedsModelNotices
impl UnsafeUnpin for NeedsModelNoticeswhere
&'static str: UnsafeUnpin,
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const LeafNode<String, SetValZST> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, SetValZST)>>: UnsafeUnpin,
impl UnwindSafe for NeedsModelNotices
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> 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