pub struct WebsocketProxy<S>{ /* private fields */ }
Expand description
WebsocketProxy proxies an incoming websocket connection to another websocket, connected via awc.
Trait Implementations§
Source§impl<S> Actor for WebsocketProxy<S>
impl<S> Actor for WebsocketProxy<S>
Source§type Context = WebsocketContext<WebsocketProxy<S>>
type Context = WebsocketContext<WebsocketProxy<S>>
Actor execution context type
Source§fn started(&mut self, ctx: &mut Self::Context)
fn started(&mut self, ctx: &mut Self::Context)
Called when an actor gets polled the first time.
Source§impl<S> StreamHandler<Result<Frame, ProtocolError>> for WebsocketProxy<S>
impl<S> StreamHandler<Result<Frame, ProtocolError>> for WebsocketProxy<S>
Source§fn handle(
&mut self,
item: Result<Frame, ProtocolError>,
ctx: &mut Self::Context,
)
fn handle( &mut self, item: Result<Frame, ProtocolError>, ctx: &mut Self::Context, )
Called for every message emitted by the stream.
Source§fn add_stream<S>(stream: S, ctx: &mut Self::Context) -> SpawnHandlewhere
S: Stream + 'static,
Self: StreamHandler<<S as Stream>::Item>,
Self::Context: AsyncContext<Self>,
fn add_stream<S>(stream: S, ctx: &mut Self::Context) -> SpawnHandlewhere
S: Stream + 'static,
Self: StreamHandler<<S as Stream>::Item>,
Self::Context: AsyncContext<Self>,
Register a Stream to the actor context.
Source§impl<S> StreamHandler<Result<Message, ProtocolError>> for WebsocketProxy<S>
impl<S> StreamHandler<Result<Message, ProtocolError>> for WebsocketProxy<S>
Source§fn handle(
&mut self,
item: Result<Message, ProtocolError>,
ctx: &mut Self::Context,
)
fn handle( &mut self, item: Result<Message, ProtocolError>, ctx: &mut Self::Context, )
Called for every message emitted by the stream.
Source§fn add_stream<S>(stream: S, ctx: &mut Self::Context) -> SpawnHandlewhere
S: Stream + 'static,
Self: StreamHandler<<S as Stream>::Item>,
Self::Context: AsyncContext<Self>,
fn add_stream<S>(stream: S, ctx: &mut Self::Context) -> SpawnHandlewhere
S: Stream + 'static,
Self: StreamHandler<<S as Stream>::Item>,
Self::Context: AsyncContext<Self>,
Register a Stream to the actor context.
Source§impl<S> WriteHandler<ProtocolError> for WebsocketProxy<S>
impl<S> WriteHandler<ProtocolError> for WebsocketProxy<S>
Auto Trait Implementations§
impl<S> Freeze for WebsocketProxy<S>
impl<S> !RefUnwindSafe for WebsocketProxy<S>
impl<S> !Send for WebsocketProxy<S>
impl<S> !Sync for WebsocketProxy<S>
impl<S> Unpin for WebsocketProxy<S>
impl<S> !UnwindSafe for WebsocketProxy<S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more