pub enum NotifierRequest {
Notify {
alarm_id: String,
keep_alive: EventPair,
control_handle: NotifierControlHandle,
},
NotifyError {
alarm_id: String,
error: WakeAlarmsError,
control_handle: NotifierControlHandle,
},
_UnknownMethod {
ordinal: u64,
control_handle: NotifierControlHandle,
method_type: MethodType,
},
}
Expand description
[Notifier] is used to notify when a wake alarm fires.
A client-end channel of this protocol will be provided to the implementor of [WakeAlarms.Set].
Dropping the server-end will cancel all alarms scheduled with [WakeAlarms.Set] associated with this server instance.
Variants§
Notify
Notifies when an alarm previously set by [WakeAlarms.Set] fires.
NotifyError
Notifies when an alarm previously set by [WakeAlarms.Set] is unable to fire due to an error.
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§
control_handle: NotifierControlHandle
§
method_type: MethodType
Implementations§
Source§impl NotifierRequest
impl NotifierRequest
pub fn into_notify(self) -> Option<(String, EventPair, NotifierControlHandle)>
pub fn into_notify_error( self, ) -> Option<(String, WakeAlarmsError, NotifierControlHandle)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NotifierRequest
impl !RefUnwindSafe for NotifierRequest
impl Send for NotifierRequest
impl Sync for NotifierRequest
impl Unpin for NotifierRequest
impl !UnwindSafe for NotifierRequest
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