pub struct PushSubscriptionCreateInput {
pub id: MaybeUndefined<String>,
pub data: String,
pub type: MaybeUndefined<PushSubscriptionType>,
}Expand description
Input for creating a push subscription to receive push notifications on a device or browser.
Fields§
§id: MaybeUndefined<String>The identifier in UUID v4 format. If none is provided, the backend will generate one.
data: StringThe push subscription data in stringified JSON format. For web subscriptions, this must contain keys, endpoint, and expirationTime fields per the Web Push API specification. For mobile subscriptions, this contains the device token.
type: MaybeUndefined<PushSubscriptionType>The type of push subscription: ‘web’ for browser-based Web Push API, ‘apple’ for Apple Push Notification service (or ‘appleDevelopment’ for sandbox), or ‘firebase’ for Firebase Cloud Messaging (Android).
Trait Implementations§
Source§impl Clone for PushSubscriptionCreateInput
impl Clone for PushSubscriptionCreateInput
Source§fn clone(&self) -> PushSubscriptionCreateInput
fn clone(&self) -> PushSubscriptionCreateInput
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PushSubscriptionCreateInput
impl Debug for PushSubscriptionCreateInput
Source§impl Default for PushSubscriptionCreateInput
impl Default for PushSubscriptionCreateInput
Source§fn default() -> PushSubscriptionCreateInput
fn default() -> PushSubscriptionCreateInput
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PushSubscriptionCreateInput
impl<'de> Deserialize<'de> for PushSubscriptionCreateInput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PushSubscriptionCreateInput
impl RefUnwindSafe for PushSubscriptionCreateInput
impl Send for PushSubscriptionCreateInput
impl Sync for PushSubscriptionCreateInput
impl Unpin for PushSubscriptionCreateInput
impl UnsafeUnpin for PushSubscriptionCreateInput
impl UnwindSafe for PushSubscriptionCreateInput
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