Struct web_push::SubscriptionInfo
source · [−]pub struct SubscriptionInfo {
pub endpoint: String,
pub keys: SubscriptionKeys,
}
Expand description
Client info for sending the notification. Maps the values from browser’s subscription info JSON data (AKA pushSubscription object).
Client pushSubscription objects can be directly deserialized into this struct using serde.
Fields
endpoint: String
The endpoint URI for sending the notification.
keys: SubscriptionKeys
The encryption key and secret for payload encryption.
Implementations
sourceimpl SubscriptionInfo
impl SubscriptionInfo
sourcepub fn new<S>(endpoint: S, p256dh: S, auth: S) -> SubscriptionInfo where
S: Into<String>,
pub fn new<S>(endpoint: S, p256dh: S, auth: S) -> SubscriptionInfo where
S: Into<String>,
A constructor function to create a new SubscriptionInfo
, if not using
Serde’s serialization.
Trait Implementations
sourceimpl Clone for SubscriptionInfo
impl Clone for SubscriptionInfo
sourcefn clone(&self) -> SubscriptionInfo
fn clone(&self) -> SubscriptionInfo
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 SubscriptionInfo
impl Debug for SubscriptionInfo
sourceimpl Default for SubscriptionInfo
impl Default for SubscriptionInfo
sourcefn default() -> SubscriptionInfo
fn default() -> SubscriptionInfo
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for SubscriptionInfo
impl<'de> Deserialize<'de> for SubscriptionInfo
sourcefn 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
sourceimpl Hash for SubscriptionInfo
impl Hash for SubscriptionInfo
sourceimpl Ord for SubscriptionInfo
impl Ord for SubscriptionInfo
sourceimpl PartialEq<SubscriptionInfo> for SubscriptionInfo
impl PartialEq<SubscriptionInfo> for SubscriptionInfo
sourcefn eq(&self, other: &SubscriptionInfo) -> bool
fn eq(&self, other: &SubscriptionInfo) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SubscriptionInfo) -> bool
fn ne(&self, other: &SubscriptionInfo) -> bool
This method tests for !=
.
sourceimpl PartialOrd<SubscriptionInfo> for SubscriptionInfo
impl PartialOrd<SubscriptionInfo> for SubscriptionInfo
sourcefn partial_cmp(&self, other: &SubscriptionInfo) -> Option<Ordering>
fn partial_cmp(&self, other: &SubscriptionInfo) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl Serialize for SubscriptionInfo
impl Serialize for SubscriptionInfo
impl Eq for SubscriptionInfo
impl StructuralEq for SubscriptionInfo
impl StructuralPartialEq for SubscriptionInfo
Auto Trait Implementations
impl RefUnwindSafe for SubscriptionInfo
impl Send for SubscriptionInfo
impl Sync for SubscriptionInfo
impl Unpin for SubscriptionInfo
impl UnwindSafe for SubscriptionInfo
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>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
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