Struct rivet_identity::model::GlobalEventNotification
source · [−]#[non_exhaustive]pub struct GlobalEventNotification {
pub title: Option<String>,
pub description: Option<String>,
pub thumbnail_url: Option<String>,
pub url: Option<String>,
}
Expand description
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.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.title: Option<String>
description: Option<String>
thumbnail_url: Option<String>
URL to an image thumbnail that should be shown for this notification.
url: Option<String>
Rivet Hub URL that holds the relevant context for this notification.
Implementations
sourceimpl GlobalEventNotification
impl GlobalEventNotification
sourceimpl GlobalEventNotification
impl GlobalEventNotification
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture GlobalEventNotification
Trait Implementations
sourceimpl Clone for GlobalEventNotification
impl Clone for GlobalEventNotification
sourcefn clone(&self) -> GlobalEventNotification
fn clone(&self) -> GlobalEventNotification
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for GlobalEventNotification
impl Debug for GlobalEventNotification
sourceimpl PartialEq<GlobalEventNotification> for GlobalEventNotification
impl PartialEq<GlobalEventNotification> for GlobalEventNotification
sourcefn eq(&self, other: &GlobalEventNotification) -> bool
fn eq(&self, other: &GlobalEventNotification) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &GlobalEventNotification) -> bool
fn ne(&self, other: &GlobalEventNotification) -> bool
This method tests for !=
.
impl StructuralPartialEq for GlobalEventNotification
Auto Trait Implementations
impl RefUnwindSafe for GlobalEventNotification
impl Send for GlobalEventNotification
impl Sync for GlobalEventNotification
impl Unpin for GlobalEventNotification
impl UnwindSafe for GlobalEventNotification
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