pub struct Notification { /* private fields */ }Expand description
A SwiftBar notification that can be opened as a URL.
Implementations§
Source§impl Notification
impl Notification
Sourcepub fn new(swiftbar: SwiftBar) -> Result<Self, PluginNameError>
pub fn new(swiftbar: SwiftBar) -> Result<Self, PluginNameError>
Creates a new notification with default options.
Call methods on the returned instance to configure it.
Sourcepub fn subtitle(self, subtitle: impl ToString) -> Self
pub fn subtitle(self, subtitle: impl ToString) -> Self
Sets the subtitle for this notification.
Sourcepub fn href(self, href: impl IntoUrl) -> Result<Self, ParseError>
pub fn href(self, href: impl IntoUrl) -> Result<Self, ParseError>
Adds an URL that will be opened when this notification is clicked.
Trait Implementations§
Source§impl<'a> IntoUrl for &'a Notification
impl<'a> IntoUrl for &'a Notification
Auto Trait Implementations§
impl Freeze for Notification
impl RefUnwindSafe for Notification
impl Send for Notification
impl Sync for Notification
impl Unpin for Notification
impl UnwindSafe for Notification
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