pub struct Notify { /* private fields */ }Expand description
Fluent notification builder.
Implementations§
Source§impl Notify
impl Notify
pub fn to(user_id: i64) -> Self
pub fn to_many(ids: impl IntoIterator<Item = i64>) -> Self
pub fn channel(self, slug: impl Into<String>) -> Self
pub fn event(self, event: impl Into<String>) -> Self
pub fn title(self, title: impl Into<String>) -> Self
pub fn body(self, body: impl Into<String>) -> Self
pub fn data(self, data: Value) -> Self
pub fn via(self, vias: impl IntoIterator<Item = Via>) -> Self
Sourcepub fn system(self, yes: bool) -> Self
pub fn system(self, yes: bool) -> Self
Mark as system send (default for builders) — skips channel publish ACL.
Sourcepub fn as_user(self) -> Self
pub fn as_user(self) -> Self
HTTP / untrusted send: enforce channel publish permission when set.
pub async fn send(self, req: &Request) -> Result<Vec<NotificationRow>>
Auto Trait Implementations§
impl Freeze for Notify
impl RefUnwindSafe for Notify
impl Send for Notify
impl Sync for Notify
impl Unpin for Notify
impl UnsafeUnpin for Notify
impl UnwindSafe for Notify
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