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

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

Implementations

impl<'a, TRng> Framer<'a, TRng, Client> where
    TRng: RngCore
[src]

pub fn connect<TStream>(
    &mut self,
    stream: &mut TStream,
    websocket_options: &WebSocketOptions<'_>
) -> Result<(), FramerError> where
    TStream: Read + Write
[src]

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

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

pub fn state(&self) -> WebSocketState[src]

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

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

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

pub fn read_binary<'b, TStream>(
    &mut self,
    stream: &mut TStream,
    frame_buf: &'b mut [u8]
) -> Result<Option<&'b [u8]>, FramerError> where
    TStream: Read + Write
[src]

Auto Trait Implementations

impl<'a, TRng, TWebSocketType> RefUnwindSafe for Framer<'a, TRng, TWebSocketType> where
    TRng: RefUnwindSafe,
    TWebSocketType: RefUnwindSafe

impl<'a, TRng, TWebSocketType> Send for Framer<'a, TRng, TWebSocketType> where
    TRng: Send,
    TWebSocketType: Send

impl<'a, TRng, TWebSocketType> Sync for Framer<'a, TRng, TWebSocketType> where
    TRng: Sync,
    TWebSocketType: Sync

impl<'a, TRng, TWebSocketType> Unpin for Framer<'a, TRng, TWebSocketType>

impl<'a, TRng, TWebSocketType> !UnwindSafe for Framer<'a, TRng, TWebSocketType>

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.