Struct rivet_identity::model::global_event::Builder
source · [−]#[non_exhaustive]pub struct Builder { /* private fields */ }
Expand description
A builder for GlobalEvent
Implementations
sourceimpl Builder
impl Builder
sourcepub fn kind(self, input: GlobalEventKind) -> Self
pub fn kind(self, input: GlobalEventKind) -> Self
Kind of event that occured.
sourcepub fn set_kind(self, input: Option<GlobalEventKind>) -> Self
pub fn set_kind(self, input: Option<GlobalEventKind>) -> Self
Kind of event that occured.
sourcepub fn notification(self, input: GlobalEventNotification) -> Self
pub fn notification(self, input: GlobalEventNotification) -> Self
Notifications represent information that should be presented to the user immediately. At the moment, only chat message events have associated notifications. # Display Notifications should be displayed in an unobtrusive manner throughout the entire game. Notifications should disappear after a few seconds if not interacted with. # Interactions If your platform supports it, notifications should be able to be clicked or tapped in order to open the relevant context for the event. For a simple implementation of notification interactions, open url
in a web browser to present the relevant context. For example, a chat message notification will open the thread the chat message was sent in. For advanced implementations that implement a custom chat UI, use rivet.api.identity.common#GlobalEvent$kind
to determine what action to take when the notification is interacted with. For example, if the global event kind is rivet.api.identity.common#GlobalEventChatMessage
, then open the chat UI for the given thread.
sourcepub fn set_notification(self, input: Option<GlobalEventNotification>) -> Self
pub fn set_notification(self, input: Option<GlobalEventNotification>) -> Self
Notifications represent information that should be presented to the user immediately. At the moment, only chat message events have associated notifications. # Display Notifications should be displayed in an unobtrusive manner throughout the entire game. Notifications should disappear after a few seconds if not interacted with. # Interactions If your platform supports it, notifications should be able to be clicked or tapped in order to open the relevant context for the event. For a simple implementation of notification interactions, open url
in a web browser to present the relevant context. For example, a chat message notification will open the thread the chat message was sent in. For advanced implementations that implement a custom chat UI, use rivet.api.identity.common#GlobalEvent$kind
to determine what action to take when the notification is interacted with. For example, if the global event kind is rivet.api.identity.common#GlobalEventChatMessage
, then open the chat UI for the given thread.
sourcepub fn build(self) -> GlobalEvent
pub fn build(self) -> GlobalEvent
Consumes the builder and constructs a GlobalEvent
Trait Implementations
sourceimpl PartialEq<Builder> for Builder
impl PartialEq<Builder> for Builder
impl StructuralPartialEq for Builder
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more