Struct Value
struct Value(_)
A value used in a list of Keywords.
The value has to be a sequence of one or more alphanumerical strings
separated by -.
Each part of the sequence has to be no shorter than three characters and no
longer than 8.
Examples
use ;
use assert_writeable_eq;
assert_writeable_eq!;
assert_writeable_eq!;
// The value "true" has the special, empty string representation
assert_eq!;
Implementations
impl Value
impl Value
const fn as_single_subtag(self: &Self) -> Option<&Subtag>Returns a reference to a single
Subtagif theValuecontains exactly one subtag, orNoneotherwise.Examples
use FromStr; use Value; let value1 = from_str.expect; let value2 = from_str.expect; assert!; assert!;fn into_single_subtag(self: Self) -> Option<Subtag>Destructs into a single
Subtagif theValuecontains exactly one subtag, or returnsNoneotherwise.Examples
use FromStr; use Value; let value1 = from_str.expect; let value2 = from_str.expect; assert!; assert!;fn subtag_count(self: &Self) -> usizeReturns the number of subtags in the
Value.Examples
use ; let mut v = default; assert_eq!; v.push_subtag; assert_eq!;const fn new_empty() -> SelfCreates an empty
Value, which corresponds to a "true" value.Examples
use ; assert_eq!;fn is_empty(self: &Self) -> boolReturns
trueif the Value has no subtags.Examples
use ; let mut v = default; assert_eq!;fn remove_subtag(self: &mut Self, idx: usize) -> Option<Subtag>Removes and returns the subtag at position
indexwithin the value, shifting all subtags after it to the left.Examples
use ; let mut v = default; v.push_subtag; v.push_subtag; v.push_subtag; assert_eq!; assert_eq!;fn get_subtag(self: &Self, idx: usize) -> Option<&Subtag>Returns a reference to a subtag at index.
Examples
use ; let mut v = default; v.push_subtag; v.push_subtag; v.push_subtag; assert_eq!; assert_eq!;
impl Clone for Value
fn clone(self: &Self) -> Value
impl Debug for Value
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Default for Value
fn default() -> Value
impl Display for Value
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Eq for Value
impl Freeze for Value
impl From for Value
fn from(input: RegionOverride) -> Value
impl From for Value
fn from(input: RegionalSubdivision) -> Value
impl From for Value
fn from(input: TimeZoneShortId) -> Value
impl From for Value
fn from(input: CurrencyType) -> Value
impl From for Value
fn from(input: NumberingSystem) -> Value
impl Hash for Value
fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)
impl IntoIterator for Value
fn into_iter(self: Self) -> <Self as >::IntoIter
impl Ord for Value
fn cmp(self: &Self, other: &Value) -> Ordering
impl PartialEq for Value
fn eq(self: &Self, other: &&str) -> bool
impl PartialEq for Value
fn eq(self: &Self, other: &Value) -> bool
impl PartialOrd for Value
fn partial_cmp(self: &Self, other: &Value) -> Option<Ordering>
impl RefUnwindSafe for Value
impl Send for Value
impl StructuralPartialEq for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
impl Writeable for Value
fn write_to<W: core::fmt::Write + ?Sized>(self: &Self, sink: &mut W) -> Resultfn writeable_length_hint(self: &Self) -> LengthHint
impl<T> Any for Value
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Value
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Value
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for Value
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> ErasedDestructor for Value
impl<T> From for Value
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Value
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T> ToString for Value
fn to_string(self: &Self) -> String
impl<T, U> Into for Value
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Value
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Value
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>