Enum boltchat::events::Events[][src]

pub enum Events {
    Join(JoinEvent),
    Leave(LeaveEvent),
    Message(MessageEvent),
    Error(ErrorEvent),
}

Events enum to decide which event should be de- serialized.

Variants

Join(JoinEvent)
Leave(LeaveEvent)
Message(MessageEvent)
Error(ErrorEvent)

Implementations

impl Events[src]

pub fn deserialize(raw: String) -> Result<Events, String>[src]

This method deserializes a raw event String into the Event it should be.

pub fn serialize(event: Events) -> Result<String, String>[src]

This method serializes an Event into the String it should be.

Trait Implementations

impl Debug for Events[src]

Auto Trait Implementations

impl RefUnwindSafe for Events

impl Send for Events

impl Sync for Events

impl Unpin for Events

impl UnwindSafe for Events

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> Same<T> for T

type Output = T

Should always be Self

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, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,