[][src]Struct protobuf::Chars

pub struct Chars(_);

Thin wrapper around Bytes which guarantees that bytes are valid UTF-8 string.

Methods

impl Chars[src]

pub fn new() -> Chars[src]

New empty object.

pub fn from_bytes(bytes: Bytes) -> Result<Chars, Utf8Error>[src]

Try convert from Bytes

pub fn len(&self) -> usize[src]

Len in bytes.

pub fn is_empty(&self) -> bool[src]

Self-explanatory

Trait Implementations

impl Clear for Chars[src]

impl Clone for Chars[src]

impl Debug for Chars[src]

impl Default for Chars[src]

impl Deref for Chars[src]

type Target = str

The resulting type after dereferencing.

impl Display for Chars[src]

impl Eq for Chars[src]

impl<'a> From<&'a str> for Chars[src]

impl From<String> for Chars[src]

impl Hash for Chars[src]

impl Ord for Chars[src]

impl PartialEq<Chars> for Chars[src]

impl PartialOrd<Chars> for Chars[src]

impl ProtobufValue for Chars[src]

impl StructuralEq for Chars[src]

impl StructuralPartialEq for Chars[src]

Auto Trait Implementations

impl RefUnwindSafe for Chars

impl Send for Chars

impl Sync for Chars

impl Unpin for Chars

impl UnwindSafe for Chars

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.