pub struct Value(/* private fields */);Expand description
A value used in a list of Fields.
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 icu::locid::extensions::transform::Value;
"hybrid".parse::<Value>().expect("Valid Value.");
"hybrid-foobar".parse::<Value>().expect("Valid Value.");
"no".parse::<Value>().expect_err("Invalid Value.");Implementations§
source§impl Value
 
impl Value
sourcepub fn try_from_bytes(input: &[u8]) -> Result<Self, ParserError>
 
pub fn try_from_bytes(input: &[u8]) -> Result<Self, ParserError>
Trait Implementations§
source§impl Display for Value
 
impl Display for Value
This trait is implemented for compatibility with fmt!.
To create a string, [Writeable::write_to_string] is usually more efficient.
source§impl Ord for Value
 
impl Ord for Value
source§impl PartialOrd for Value
 
impl PartialOrd for Value
source§impl Writeable for Value
 
impl Writeable for Value
source§fn write_to<W: Write + ?Sized>(&self, sink: &mut W) -> Result
 
fn write_to<W: Write + ?Sized>(&self, sink: &mut W) -> Result
Writes a string to the given sink. Errors from the sink are bubbled up.
The default implementation delegates to 
write_to_parts, and discards any
Part annotations.source§fn writeable_length_hint(&self) -> LengthHint
 
fn writeable_length_hint(&self) -> LengthHint
Returns a hint for the number of UTF-8 bytes that will be written to the sink. Read more
source§fn write_to_string(&self) -> Cow<'_, str>
 
fn write_to_string(&self) -> Cow<'_, str>
Creates a new 
String with the data from this Writeable. Like ToString,
but smaller and faster. Read moresource§fn write_to_parts<S>(&self, sink: &mut S) -> Result<(), Error>where
    S: PartsWrite + ?Sized,
 
fn write_to_parts<S>(&self, sink: &mut S) -> Result<(), Error>where
    S: PartsWrite + ?Sized,
Write bytes and 
Part annotations to the given sink. Errors from the
sink are bubbled up. The default implementation delegates to write_to,
and doesn’t produce any Part annotations.impl Eq for Value
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
 
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)