pub struct DeviceTimeZone(/* private fields */);Expand description
The time zone a device reported when it registered, as an IANA name.
The registry checks the shape only. Resolve the name with a time zone database before registering if the product schedules by it.
Implementations§
Source§impl DeviceTimeZone
impl DeviceTimeZone
Sourcepub fn new(name: impl Into<String>) -> Result<Self, PushValidationError>
pub fn new(name: impl Into<String>) -> Result<Self, PushValidationError>
Validates the shape of an IANA name such as Europe/Berlin or Etc/GMT+5.
§Errors
Returns PushValidationError::DeviceTimeZone when the name is empty,
longer than MAX_DEVICE_TIME_ZONE_LENGTH, or has a character outside
ASCII letters, digits, /, _, +, and -.
Trait Implementations§
Source§impl Clone for DeviceTimeZone
impl Clone for DeviceTimeZone
Source§impl Debug for DeviceTimeZone
impl Debug for DeviceTimeZone
impl Eq for DeviceTimeZone
Source§impl Hash for DeviceTimeZone
impl Hash for DeviceTimeZone
Source§impl PartialEq for DeviceTimeZone
impl PartialEq for DeviceTimeZone
impl StructuralPartialEq for DeviceTimeZone
Auto Trait Implementations§
impl Freeze for DeviceTimeZone
impl RefUnwindSafe for DeviceTimeZone
impl Send for DeviceTimeZone
impl Sync for DeviceTimeZone
impl Unpin for DeviceTimeZone
impl UnsafeUnpin for DeviceTimeZone
impl UnwindSafe for DeviceTimeZone
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.