[][src]Enum ws_frame::Status

pub enum Status {
    Complete(usize),
    Partial,
}

The result of a successful decode pass.

Complete is used when the buffer contained the complete value. Partial is used when decoding did not reach the end of the expected value, but no invalid data was found.

Variants

Complete(usize)

The completed result.

Contains the amount of bytes decoded.

Partial

A partial result.

Methods

impl Status[src]

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

Convenience method to check if status is complete.

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

Convenience method to check if status is partial.

pub fn unwrap(self) -> usize[src]

Convenience method to unwrap a Complete value. Panics if the status is partial.

Trait Implementations

impl PartialEq<Status> for Status[src]

impl Debug for Status[src]

Auto Trait Implementations

impl Sync for Status

impl Unpin for Status

impl Send for Status

impl UnwindSafe for Status

impl RefUnwindSafe for Status

Blanket Implementations

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

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