Struct locutus_core::WebSocketProxy
source · pub struct WebSocketProxy { /* private fields */ }
Implementations§
source§impl WebSocketProxy
impl WebSocketProxy
sourcepub fn as_upgrade<T>(
socket: T,
server_config: BoxedFilter<(impl Reply + 'static,)>
) -> impl Future<Output = Result<Self, Box<dyn Error + Send + Sync + 'static>>>where
T: Into<SocketAddr>,
pub fn as_upgrade<T>(
socket: T,
server_config: BoxedFilter<(impl Reply + 'static,)>
) -> impl Future<Output = Result<Self, Box<dyn Error + Send + Sync + 'static>>>where
T: Into<SocketAddr>,
Starts this as an upgrade to an existing HTTP connection at the /ws-api
URL
sourcepub fn start_server<T>(
socket: T
) -> impl Future<Output = Result<Self, Box<dyn Error + Send + Sync + 'static>>>where
T: Into<SocketAddr>,
pub fn start_server<T>(
socket: T
) -> impl Future<Output = Result<Self, Box<dyn Error + Send + Sync + 'static>>>where
T: Into<SocketAddr>,
Starts the websocket connection at the default /ws-api
URL
Trait Implementations§
source§impl ClientEventsProxy for WebSocketProxy
impl ClientEventsProxy for WebSocketProxy
source§fn recv(&mut self) -> BoxFuture<'_, Result<OpenRequest<'static>, ClientError>>
fn recv(&mut self) -> BoxFuture<'_, Result<OpenRequest<'static>, ClientError>>
Cancellation Safety Read more
source§fn send(
&mut self,
client: ClientId,
response: Result<HostResponse, ClientError>
) -> BoxFuture<'_, Result<(), ClientError>>
fn send(
&mut self,
client: ClientId,
response: Result<HostResponse, ClientError>
) -> BoxFuture<'_, Result<(), ClientError>>
Sends a response from the host to the client application.
Auto Trait Implementations§
impl !RefUnwindSafe for WebSocketProxy
impl Send for WebSocketProxy
impl Sync for WebSocketProxy
impl Unpin for WebSocketProxy
impl !UnwindSafe for WebSocketProxy
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Upcastable for Twhere
T: 'static + Any + Send + Sync,
impl<T> Upcastable for Twhere
T: 'static + Any + Send + Sync,
§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref