pub struct Number(/* private fields */);Expand description
A phone number. Clients should generally use as_non_at_string and
from_non_at_string to work with these, which add and remove delimiting
quotes. As AT commands require these quotes to be in place around numbers,
when generating and parsing AT commands, clients should use from_at_string
and as_at_string, which maintain the quotes.
Implementations§
Source§impl Number
impl Number
Sourcepub fn type_(&self) -> i64
pub fn type_(&self) -> i64
Returns the numeric representation of the Number’s format as specified in HFP v1.8, Section 4.34.2.
Sourcepub fn to_non_at_string(&self) -> String
pub fn to_non_at_string(&self) -> String
Converts the Number to a String, stripping quotes from the beginning and end.
Sourcepub fn to_at_string(&self) -> String
pub fn to_at_string(&self) -> String
Converts the Number to a String to be used in AT commands, leaving the delimiting quotes in place.
Sourcepub fn from_non_at_string(s: &str) -> Self
pub fn from_non_at_string(s: &str) -> Self
Converts a String to a Number, adding delimiting quotes.
Sourcepub fn from_at_string(s: &str) -> Self
pub fn from_at_string(s: &str) -> Self
Converts a String to a Number, from an AT command, leaving the delimiting quotes in place.
Trait Implementations§
impl Eq for Number
impl StructuralPartialEq for Number
Auto Trait Implementations§
impl Freeze for Number
impl RefUnwindSafe for Number
impl Send for Number
impl Sync for Number
impl Unpin for Number
impl UnsafeUnpin for Number
impl UnwindSafe for Number
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
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
key and return true if they are equal.§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]§impl<T> IntoAny for T
impl<T> IntoAny for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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