Struct icu_locid::extensions::transform::Value[][src]

pub struct Value(_);

Implementations

impl Value[src]

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;

let value1: Value = "hybrid".parse()
    .expect("Failed to parse a Value.");
let value2: Value = "hybrid-foobar".parse()
    .expect("Failed to parse a Value.");

assert_eq!(&value1.to_string(), "hybrid");
assert_eq!(&value2.to_string(), "hybrid-foobar");

pub fn from_bytes(input: &[u8]) -> Result<Self, ParserError>[src]

A constructor which takes a utf8 slice, parses it and produces a well-formed Value.

Examples

use icu::locid::extensions::transform::Value;

let value = Value::from_bytes(b"hybrid")
    .expect("Parsing failed.");

assert_eq!(&value.to_string(), "hybrid");

Trait Implementations

impl Clone for Value[src]

impl Debug for Value[src]

impl Display for Value[src]

impl Eq for Value[src]

impl FromStr for Value[src]

type Err = ParserError

The associated error which can be returned from parsing.

impl Hash for Value[src]

impl Ord for Value[src]

impl PartialEq<Value> for Value[src]

impl PartialOrd<Value> for Value[src]

impl StructuralEq for Value[src]

impl StructuralPartialEq for Value[src]

impl Writeable for Value[src]

Auto Trait Implementations

impl RefUnwindSafe for Value

impl Send for Value

impl Sync for Value

impl Unpin for Value

impl UnwindSafe for Value

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.