pub struct Notifier { /* private fields */ }Expand description
A session’s sink and notice level, as they were when it was taken: what background work says its notices with.
Implementations§
Source§impl Notifier
impl Notifier
Sourcepub fn of(config: &SessionConfig) -> Self
pub fn of(config: &SessionConfig) -> Self
The notifier of the session config belongs to.
Sourcepub fn new(sink: Sink, level: NoticeLevel) -> Self
pub fn new(sink: Sink, level: NoticeLevel) -> Self
One that says notices at level to sink (for tests and hosts
without a session).
Sourcepub fn level(&self) -> NoticeLevel
pub fn level(&self) -> NoticeLevel
The level notices are said at: Off without a sink.
Sourcepub fn say(&self, level: NoticeLevel, text: impl FnOnce() -> String)
pub fn say(&self, level: NoticeLevel, text: impl FnOnce() -> String)
Say text if the level is at least level.
Sourcepub fn announce_after(&self, after: Duration, text: String) -> Announcement
pub fn announce_after(&self, after: Duration, text: String) -> Announcement
Announce text once after has passed, unless Announcement::finish
is called first; at once if after is zero.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Notifier
impl !UnwindSafe for Notifier
impl Forget for Notifier
impl Freeze for Notifier
impl Send for Notifier
impl Sync for Notifier
impl Unpin for Notifier
impl UnsafeUnpin for Notifier
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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