pub struct DeviceRegistration {
pub owner_id: Uuid,
pub token: DeviceToken,
pub platform: DevicePlatform,
pub time_zone: Option<DeviceTimeZone>,
pub registered_at: DateTime<Utc>,
}Expand description
One device’s request to receive pushes for an owner.
Fields§
§owner_id: UuidThe account the device receives notifications for.
token: DeviceTokenThe device’s current provider token.
platform: DevicePlatformThe platform the token belongs to.
time_zone: Option<DeviceTimeZone>The time zone the device reported, if the product schedules by it.
registered_at: DateTime<Utc>The service instant of this registration.
Implementations§
Source§impl DeviceRegistration
impl DeviceRegistration
Sourcepub const fn new(
owner_id: Uuid,
token: DeviceToken,
platform: DevicePlatform,
registered_at: DateTime<Utc>,
) -> Self
pub const fn new( owner_id: Uuid, token: DeviceToken, platform: DevicePlatform, registered_at: DateTime<Utc>, ) -> Self
Creates a registration without a time zone.
Sourcepub fn with_time_zone(self, time_zone: DeviceTimeZone) -> Self
pub fn with_time_zone(self, time_zone: DeviceTimeZone) -> Self
Records the time zone the device reported.
Trait Implementations§
Source§impl Clone for DeviceRegistration
impl Clone for DeviceRegistration
Source§impl Debug for DeviceRegistration
impl Debug for DeviceRegistration
impl Eq for DeviceRegistration
Source§impl PartialEq for DeviceRegistration
impl PartialEq for DeviceRegistration
impl StructuralPartialEq for DeviceRegistration
Auto Trait Implementations§
impl Freeze for DeviceRegistration
impl RefUnwindSafe for DeviceRegistration
impl Send for DeviceRegistration
impl Sync for DeviceRegistration
impl Unpin for DeviceRegistration
impl UnsafeUnpin for DeviceRegistration
impl UnwindSafe for DeviceRegistration
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.