UtcOffset

Struct UtcOffset 

Source
pub struct UtcOffset { /* private fields */ }

Implementations§

Source§

impl UtcOffset

Source

pub fn get_number(&self) -> i16

Source

pub fn is_zero(&self) -> bool

Source

pub fn is_positive(&self) -> bool

Source

pub fn is_negative(&self) -> bool

Source

pub fn is_integer(&self) -> bool

Source

pub fn from_string( input: String, ) -> Result<Self, ValidatedCustomizedNumberError>

Source

pub fn from_str(input: &str) -> Result<Self, ValidatedCustomizedNumberError>

Source

pub fn from_number(input: i16) -> Result<Self, ValidatedCustomizedNumberError>

Source

pub fn from_f64(input: f64) -> Result<Self, ValidatedCustomizedNumberError>

Source

pub fn from_f32(input: f32) -> Result<Self, ValidatedCustomizedNumberError>

Source

pub fn from_isize(input: isize) -> Result<Self, ValidatedCustomizedNumberError>

Source

pub fn from_i8(input: i8) -> Result<Self, ValidatedCustomizedNumberError>

Source

pub fn from_i16(input: i16) -> Result<Self, ValidatedCustomizedNumberError>

Source

pub fn from_i32(input: i32) -> Result<Self, ValidatedCustomizedNumberError>

Source

pub fn from_i64(input: i64) -> Result<Self, ValidatedCustomizedNumberError>

Source

pub fn from_i128(input: i128) -> Result<Self, ValidatedCustomizedNumberError>

Source

pub fn from_usize(input: usize) -> Result<Self, ValidatedCustomizedNumberError>

Source

pub fn from_u8(input: u8) -> Result<Self, ValidatedCustomizedNumberError>

Source

pub fn from_u16(input: u16) -> Result<Self, ValidatedCustomizedNumberError>

Source

pub fn from_u32(input: u32) -> Result<Self, ValidatedCustomizedNumberError>

Source

pub fn from_u64(input: u64) -> Result<Self, ValidatedCustomizedNumberError>

Source

pub fn from_u128(input: u128) -> Result<Self, ValidatedCustomizedNumberError>

Source

pub unsafe fn from_number_unchecked(input: i16) -> Self

Methods from Deref<Target = i16>§

1.43.0 · Source

pub const MIN: i16 = -32_768i16

1.43.0 · Source

pub const MAX: i16 = 32_767i16

1.53.0 · Source

pub const BITS: u32 = 16u32

Trait Implementations§

Source§

impl Clone for UtcOffset

Source§

fn clone(&self) -> UtcOffset

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for UtcOffset

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for UtcOffset

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromStr for UtcOffset

Source§

type Err = ValidatedCustomizedNumberError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, ValidatedCustomizedNumberError>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for UtcOffset

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl NumCast for UtcOffset

Source§

fn from<T: ToPrimitive>(n: T) -> Option<UtcOffset>

Creates a number from another value that can be converted into a primitive via the ToPrimitive trait. If the source value cannot be represented by the target type, then None is returned. Read more
Source§

impl PartialEq for UtcOffset

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl ToPrimitive for UtcOffset

Source§

fn to_isize(&self) -> Option<isize>

Converts the value of self to an isize. If the value cannot be represented by an isize, then None is returned.
Source§

fn to_i8(&self) -> Option<i8>

Converts the value of self to an i8. If the value cannot be represented by an i8, then None is returned.
Source§

fn to_i16(&self) -> Option<i16>

Converts the value of self to an i16. If the value cannot be represented by an i16, then None is returned.
Source§

fn to_i32(&self) -> Option<i32>

Converts the value of self to an i32. If the value cannot be represented by an i32, then None is returned.
Source§

fn to_i64(&self) -> Option<i64>

Converts the value of self to an i64. If the value cannot be represented by an i64, then None is returned.
Source§

fn to_i128(&self) -> Option<i128>

Converts the value of self to an i128. If the value cannot be represented by an i128 (i64 under the default implementation), then None is returned. Read more
Source§

fn to_usize(&self) -> Option<usize>

Converts the value of self to a usize. If the value cannot be represented by a usize, then None is returned.
Source§

fn to_u8(&self) -> Option<u8>

Converts the value of self to a u8. If the value cannot be represented by a u8, then None is returned.
Source§

fn to_u16(&self) -> Option<u16>

Converts the value of self to a u16. If the value cannot be represented by a u16, then None is returned.
Source§

fn to_u32(&self) -> Option<u32>

Converts the value of self to a u32. If the value cannot be represented by a u32, then None is returned.
Source§

fn to_u64(&self) -> Option<u64>

Converts the value of self to a u64. If the value cannot be represented by a u64, then None is returned.
Source§

fn to_u128(&self) -> Option<u128>

Converts the value of self to a u128. If the value cannot be represented by a u128 (u64 under the default implementation), then None is returned. Read more
Source§

fn to_f32(&self) -> Option<f32>

Converts the value of self to an f32. Overflows may map to positive or negative inifinity, otherwise None is returned if the value cannot be represented by an f32.
Source§

fn to_f64(&self) -> Option<f64>

Converts the value of self to an f64. Overflows may map to positive or negative inifinity, otherwise None is returned if the value cannot be represented by an f64. Read more
Source§

impl<T: ToPrimitive> ValidatedNumberWrapper<T> for UtcOffset

Source§

impl ValidatedWrapper for UtcOffset

Source§

impl Value for UtcOffset

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

impl Deref for UtcOffset

Source§

type Target = i16

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl Eq for UtcOffset

Source§

impl Validated for UtcOffset

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.