Struct embedded_websocket::framer::Framer[][src]

pub struct Framer<'a, TRng, TWebSocketType, TStream> where
    TRng: RngCore,
    TWebSocketType: WebSocketType,
    TStream: Read + Write
{ /* fields omitted */ }

Implementations

impl<'a, TRng, TStream> Framer<'a, TRng, Client, TStream> where
    TRng: RngCore,
    TStream: Read + Write
[src]

pub fn connect(
    &mut self,
    websocket_options: &WebSocketOptions<'_>
) -> Result<(), FramerError>
[src]

impl<'a, TRng, TWebSocketType, TStream> Framer<'a, TRng, TWebSocketType, TStream> where
    TRng: RngCore,
    TWebSocketType: WebSocketType,
    TStream: Read + Write
[src]

pub fn new(
    read_buf: &'a mut [u8],
    write_buf: &'a mut [u8],
    websocket: &'a mut WebSocket<TRng, TWebSocketType>,
    stream: &'a mut TStream
) -> Self
[src]

pub fn close(
    &mut self,
    close_status: WebSocketCloseStatusCode,
    status_description: Option<&str>
) -> Result<(), FramerError>
[src]

pub fn write(
    &mut self,
    message_type: WebSocketSendMessageType,
    end_of_message: bool,
    frame_buf: &[u8]
) -> Result<(), FramerError>
[src]

pub fn read_text<'b>(
    &mut self,
    frame_buf: &'b mut [u8]
) -> Result<Option<&'b str>, FramerError>
[src]

pub fn read_binary<'b>(
    &mut self,
    frame_buf: &'b mut [u8]
) -> Result<Option<&'b [u8]>, FramerError>
[src]

Auto Trait Implementations

impl<'a, TRng, TWebSocketType, TStream> RefUnwindSafe for Framer<'a, TRng, TWebSocketType, TStream> where
    TRng: RefUnwindSafe,
    TStream: RefUnwindSafe,
    TWebSocketType: RefUnwindSafe
[src]

impl<'a, TRng, TWebSocketType, TStream> Send for Framer<'a, TRng, TWebSocketType, TStream> where
    TRng: Send,
    TStream: Send,
    TWebSocketType: Send
[src]

impl<'a, TRng, TWebSocketType, TStream> Sync for Framer<'a, TRng, TWebSocketType, TStream> where
    TRng: Sync,
    TStream: Sync,
    TWebSocketType: Sync
[src]

impl<'a, TRng, TWebSocketType, TStream> Unpin for Framer<'a, TRng, TWebSocketType, TStream>[src]

impl<'a, TRng, TWebSocketType, TStream> !UnwindSafe for Framer<'a, TRng, TWebSocketType, TStream>[src]

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.