pub struct MwsMessage {
pub space_id: Option<String>,
pub from: Option<String>,
pub target: Option<String>,
pub sig: Option<String>,
pub type: Option<String>,
pub payload: Option<String>,
pub control: Option<String>,
pub error: Option<ErrorResponse>,
pub client_info: Option<MwsClientInfo>,
}Fields§
§space_id: Option<String>§from: Option<String>§target: Option<String>§sig: Option<String>§type: Option<String>§payload: Option<String>§control: Option<String>Transport-owned lifecycle data. It is deliberately separate from the application payload so schema request bodies never become a framework envelope.
error: Option<ErrorResponse>§client_info: Option<MwsClientInfo>Implementations§
Source§impl MwsMessage
impl MwsMessage
pub fn create( space_id: Option<String>, target: String, sig: String, payload: String, msg_type: String, ) -> Self
pub fn dummy() -> Self
pub fn server_response( target: String, sig: String, payload: String, client_info: MwsClientInfo, ) -> Self
pub fn server_response_error( target: String, sig: String, error: ErrorResponse, client_info: MwsClientInfo, ) -> Self
pub fn connection_server_data( target: String, payload: String, client_info: MwsClientInfo, ) -> Self
pub fn space_server_data( space_id: String, target: String, payload: String, client_info: Option<MwsClientInfo>, ) -> Self
pub fn hub_response( target: String, sig: String, payload: String, client_info: MwsClientInfo, ) -> Self
pub fn hub_response_error( target: String, sig: String, error: ErrorResponse, client_info: MwsClientInfo, ) -> Self
pub fn hub_request( space_id: Option<String>, target: String, sig: String, payload: String, ) -> Self
pub fn hub_request_with_control( space_id: Option<String>, target: String, sig: String, payload: String, control: Option<String>, ) -> Self
pub fn hub_data( space_id: Option<String>, target: String, sig: String, payload: String, ) -> Self
pub fn set_from(&mut self, from: String)
pub fn set_target(&mut self, target: String)
pub fn set_sig(&mut self, sig: String)
pub fn set_payload(&mut self, payload: String)
pub fn set_type(&mut self, msg_type: String)
pub fn set_client_info(&mut self, client_info: MwsClientInfo)
Trait Implementations§
Source§impl Clone for MwsMessage
impl Clone for MwsMessage
Source§impl Debug for MwsMessage
impl Debug for MwsMessage
Source§impl Default for MwsMessage
impl Default for MwsMessage
Source§impl<'de> Deserialize<'de> for MwsMessage
impl<'de> Deserialize<'de> for MwsMessage
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for MwsMessage
impl Freeze for MwsMessagewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Value>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
impl Move for MwsMessage
impl RefUnwindSafe for MwsMessage
impl Send for MwsMessage
impl Sync for MwsMessage
impl Unpin for MwsMessage
impl UnsafeUnpin for MwsMessagewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
impl UnwindSafe for MwsMessage
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