pub struct ServiceNotifier { /* private fields */ }Expand description
An app’s end of its notification connection: a Rust app’s Notifier, the same service a
tilolang instance reaches.
Implementations§
Source§impl ServiceNotifier
impl ServiceNotifier
Sourcepub fn from_env() -> Option<ServiceNotifier>
pub fn from_env() -> Option<ServiceNotifier>
The notifier over the connection the launcher opened for this app, named by FD_ENV;
None when this process was handed none.
Sourcepub fn connect(stream: UnixStream) -> Option<ServiceNotifier>
pub fn connect(stream: UnixStream) -> Option<ServiceNotifier>
The notifier over stream, the connection the session opened for the app; None when it
cannot be read and written beside this end.
Trait Implementations§
Source§impl Notifier for ServiceNotifier
impl Notifier for ServiceNotifier
fn show(&self, notification: &Notification) -> Result<(), NotifyError>
fn withdraw(&self, tag: &str) -> Result<(), NotifyError>
fn schedule( &self, notification: &Notification, at: SystemTime, ) -> Result<(), NotifyError>
fn schedule_alarm( &self, notification: &Notification, at: SystemTime, schedule: AlarmSchedule, ) -> Result<(), NotifyError>
fn scheduled(&self) -> Result<Vec<Scheduled>, NotifyError>
Source§fn alarm_states(&self) -> Result<Vec<AlarmState>, NotifyError>
fn alarm_states(&self) -> Result<Vec<AlarmState>, NotifyError>
Calendar handoffs and delivered occurrences owned by this app; a host that keeps
only an absolute deadline returns none.
fn cancel_scheduled(&self, tag: &str) -> Result<(), NotifyError>
Auto Trait Implementations§
impl Forget for ServiceNotifier
impl Freeze for ServiceNotifier
impl Move for ServiceNotifier
impl RefUnwindSafe for ServiceNotifier
impl Send for ServiceNotifier
impl Sync for ServiceNotifier
impl Unpin for ServiceNotifier
impl UnsafeUnpin for ServiceNotifier
impl UnwindSafe for ServiceNotifier
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