[][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 ProtobufValue for Chars[src]

fn as_any(&self) -> &dyn Any[src]

Convert to Any

fn is_non_zero(&self) -> bool[src]

Is value non-zero?

fn as_ref_copy(&self) -> ProtobufValueRef<'static>[src]

Return ProtobufValueRef if self is Copy. Read more

impl Default for Chars[src]

impl Ord for Chars[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl Clone for Chars[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialEq<Chars> for Chars[src]

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

impl From<String> for Chars[src]

impl Eq for Chars[src]

impl PartialOrd<Chars> for Chars[src]

impl Deref for Chars[src]

type Target = str

The resulting type after dereferencing.

impl Debug for Chars[src]

impl Display for Chars[src]

impl Hash for Chars[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Sync for Chars

impl Unpin for Chars

impl Send for Chars

impl UnwindSafe for Chars

impl RefUnwindSafe for Chars

Blanket Implementations

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> From<T> for T[src]

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.

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

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

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