pub struct NotificationBuilder<State>(/* private fields */);
Expand description
Builder for serializing an instance of the Notification type.
Can be created using the Notification::builder method.
Implementations§
Source§impl NotificationBuilder<()>
impl NotificationBuilder<()>
Sourcepub fn handler_id<T0>(self, value: T0) -> NotificationBuilder<(T0,)>
pub fn handler_id<T0>(self, value: T0) -> NotificationBuilder<(T0,)>
Setter for the handler_id
field.
Source§impl<T0> NotificationBuilder<(T0,)>
impl<T0> NotificationBuilder<(T0,)>
Sourcepub fn event<T1>(self, value: T1) -> NotificationBuilder<(T0, T1)>
pub fn event<T1>(self, value: T1) -> NotificationBuilder<(T0, T1)>
Setter for the event
field.
Sourcepub fn event_as_default(self) -> NotificationBuilder<(T0, DefaultValue)>
pub fn event_as_default(self) -> NotificationBuilder<(T0, DefaultValue)>
Sets the event
field to the default value.
Source§impl<T0, T1> NotificationBuilder<(T0, T1)>
impl<T0, T1> NotificationBuilder<(T0, T1)>
Sourcepub fn body<T2>(self, value: T2) -> NotificationBuilder<(T0, T1, T2)>where
T2: WriteAsOptionalUnion<Body>,
pub fn body<T2>(self, value: T2) -> NotificationBuilder<(T0, T1, T2)>where
T2: WriteAsOptionalUnion<Body>,
Setter for the body
field.
Sourcepub fn body_as_null(self) -> NotificationBuilder<(T0, T1, ())>
pub fn body_as_null(self) -> NotificationBuilder<(T0, T1, ())>
Sets the body
field to null.
Source§impl<T0, T1, T2> NotificationBuilder<(T0, T1, T2)>
impl<T0, T1, T2> NotificationBuilder<(T0, T1, T2)>
Sourcepub fn finish(self, builder: &mut Builder) -> Offset<Notification>where
Self: WriteAsOffset<Notification>,
pub fn finish(self, builder: &mut Builder) -> Offset<Notification>where
Self: WriteAsOffset<Notification>,
Finish writing the builder to get an Offset to a serialized Notification.
Trait Implementations§
Source§impl<State: Debug> Debug for NotificationBuilder<State>
impl<State: Debug> Debug for NotificationBuilder<State>
impl<T0: WriteAs<Offset<str>>, T1: WriteAsDefault<Event, Event>, T2: WriteAsOptionalUnion<Body>> WriteAs<Offset<Notification>> for NotificationBuilder<(T0, T1, T2)>
impl<T0: WriteAs<Offset<str>>, T1: WriteAsDefault<Event, Event>, T2: WriteAsOptionalUnion<Body>> WriteAsOffset<Notification> for NotificationBuilder<(T0, T1, T2)>
impl<T0: WriteAs<Offset<str>>, T1: WriteAsDefault<Event, Event>, T2: WriteAsOptionalUnion<Body>> WriteAsOptional<Offset<Notification>> for NotificationBuilder<(T0, T1, T2)>
Auto Trait Implementations§
impl<State> Freeze for NotificationBuilder<State>where
State: Freeze,
impl<State> RefUnwindSafe for NotificationBuilder<State>where
State: RefUnwindSafe,
impl<State> Send for NotificationBuilder<State>where
State: Send,
impl<State> Sync for NotificationBuilder<State>where
State: Sync,
impl<State> Unpin for NotificationBuilder<State>where
State: Unpin,
impl<State> UnwindSafe for NotificationBuilder<State>where
State: UnwindSafe,
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