pub enum Message {
Ping,
Pong,
Ready,
ConnectionEstablished {
connection_id: String,
tunnel_id: String,
public_url: String,
subdomain_url: Option<String>,
path_based_url: Option<String>,
},
HttpRequest(HttpRequest),
HttpResponse(HttpResponse),
Error {
request_id: Option<String>,
code: ErrorCode,
message: String,
},
}Expand description
All WebSocket messages are wrapped in this typed envelope
Variants§
Ping
Control plane messages
Pong
Ready
ConnectionEstablished
Connection lifecycle
Fields
HttpRequest(HttpRequest)
Data plane messages
HttpResponse(HttpResponse)
Error
Error handling
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Message
impl<'de> Deserialize<'de> for Message
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
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