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]
impl<'a, TRng> Framer<'a, TRng, Client> where
TRng: RngCore,
[src]pub fn connect<E>(
&mut self,
stream: &mut impl Stream<E>,
websocket_options: &WebSocketOptions<'_>
) -> Result<Option<WebSocketSubProtocol>, FramerError<E>>
[src]
&mut self,
stream: &mut impl Stream<E>,
websocket_options: &WebSocketOptions<'_>
) -> Result<Option<WebSocketSubProtocol>, FramerError<E>>
impl<'a, TRng> Framer<'a, TRng, Server> where
TRng: RngCore,
[src]
impl<'a, TRng> Framer<'a, TRng, Server> where
TRng: RngCore,
[src]pub fn accept<E>(
&mut self,
stream: &mut impl Stream<E>,
websocket_context: &WebSocketContext
) -> Result<(), FramerError<E>>
[src]
&mut self,
stream: &mut impl Stream<E>,
websocket_context: &WebSocketContext
) -> Result<(), FramerError<E>>
impl<'a, TRng, TWebSocketType> Framer<'a, TRng, TWebSocketType> where
TRng: RngCore,
TWebSocketType: WebSocketType,
[src]
impl<'a, TRng, TWebSocketType> Framer<'a, TRng, TWebSocketType> where
TRng: RngCore,
TWebSocketType: WebSocketType,
[src]pub fn new(
read_buf: &'a mut [u8],
read_cursor: &'a mut usize,
write_buf: &'a mut [u8],
websocket: &'a mut WebSocket<TRng, TWebSocketType>
) -> Self
[src]
read_buf: &'a mut [u8],
read_cursor: &'a mut usize,
write_buf: &'a mut [u8],
websocket: &'a mut WebSocket<TRng, TWebSocketType>
) -> Self
pub fn state(&self) -> WebSocketState
[src]
pub fn close<E>(
&mut self,
stream: &mut impl Stream<E>,
close_status: WebSocketCloseStatusCode,
status_description: Option<&str>
) -> Result<(), FramerError<E>>
[src]
&mut self,
stream: &mut impl Stream<E>,
close_status: WebSocketCloseStatusCode,
status_description: Option<&str>
) -> Result<(), FramerError<E>>
pub fn write<E>(
&mut self,
stream: &mut impl Stream<E>,
message_type: WebSocketSendMessageType,
end_of_message: bool,
frame_buf: &[u8]
) -> Result<(), FramerError<E>>
[src]
&mut self,
stream: &mut impl Stream<E>,
message_type: WebSocketSendMessageType,
end_of_message: bool,
frame_buf: &[u8]
) -> Result<(), FramerError<E>>
pub fn read_text<'b, E>(
&mut self,
stream: &mut impl Stream<E>,
frame_buf: &'b mut [u8]
) -> Result<Option<&'b str>, FramerError<E>>
[src]
&mut self,
stream: &mut impl Stream<E>,
frame_buf: &'b mut [u8]
) -> Result<Option<&'b str>, FramerError<E>>
pub fn read_binary<'b, E>(
&mut self,
stream: &mut impl Stream<E>,
frame_buf: &'b mut [u8]
) -> Result<Option<&'b [u8]>, FramerError<E>>
[src]
&mut self,
stream: &mut impl Stream<E>,
frame_buf: &'b mut [u8]
) -> Result<Option<&'b [u8]>, FramerError<E>>
Auto Trait Implementations
impl<'a, TRng, TWebSocketType> RefUnwindSafe for Framer<'a, TRng, TWebSocketType> where
TRng: RefUnwindSafe,
TWebSocketType: RefUnwindSafe,
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> 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> Sync for Framer<'a, TRng, TWebSocketType> where
TRng: Sync,
TWebSocketType: Sync,
impl<'a, TRng, TWebSocketType> !UnwindSafe for Framer<'a, TRng, TWebSocketType>
impl<'a, TRng, TWebSocketType> !UnwindSafe for Framer<'a, TRng, TWebSocketType>