pub struct NotificationManagerMock { /* private fields */ }Expand description
Mock notification manager
This manager logs the calls to it and does nothing more.
Implementations§
Trait Implementations§
Source§impl Debug for NotificationManagerMock
impl Debug for NotificationManagerMock
Source§impl Default for NotificationManagerMock
impl Default for NotificationManagerMock
Source§fn default() -> NotificationManagerMock
fn default() -> NotificationManagerMock
Returns the “default value” for a type. Read more
Source§impl NotificationManager for NotificationManagerMock
impl NotificationManager for NotificationManagerMock
Source§fn get_notification_permission_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_notification_permission_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns whether the app is allowed to send notifications Read more
Source§fn first_time_ask_for_notification_permission<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn first_time_ask_for_notification_permission<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Ask for notification permission. Read more
Source§fn register(
&self,
_handler_callback: Box<dyn Fn(NotificationResponse) + Send + Sync + 'static>,
categories: Vec<NotificationCategory>,
) -> Result<(), Error>
fn register( &self, _handler_callback: Box<dyn Fn(NotificationResponse) + Send + Sync + 'static>, categories: Vec<NotificationCategory>, ) -> Result<(), Error>
Registers and initializes the notification handler and categories.
Set a function to handle user responses (clicking notification, closing it, clicking an action on it) Read more
Source§fn remove_all_delivered_notifications(&self) -> Result<(), Error>
fn remove_all_delivered_notifications(&self) -> Result<(), Error>
Removes all of your app’s delivered notifications from Notification Center. Read more
Source§fn remove_delivered_notifications(&self, ids: Vec<&str>) -> Result<(), Error>
fn remove_delivered_notifications(&self, ids: Vec<&str>) -> Result<(), Error>
Removes specific delivered notifications by their id from Notification Center. Read more
Source§fn get_active_notifications<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Box<dyn NotificationHandle>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_active_notifications<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Box<dyn NotificationHandle>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get all deliverd notifications from UNUserNotificationCenter that are still active. Read more
Source§fn send_notification<'life0, 'async_trait>(
&'life0 self,
builder: NotificationBuilder,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn NotificationHandle>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_notification<'life0, 'async_trait>(
&'life0 self,
builder: NotificationBuilder,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn NotificationHandle>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Shows notification and returns Notification handle
Auto Trait Implementations§
impl !Freeze for NotificationManagerMock
impl !RefUnwindSafe for NotificationManagerMock
impl Send for NotificationManagerMock
impl Sync for NotificationManagerMock
impl Unpin for NotificationManagerMock
impl UnwindSafe for NotificationManagerMock
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().