pub enum WebsocketServiceMessageContent {
OpenMessage(CanisterOpenMessageContent),
AckMessage(CanisterAckMessageContent),
KeepAliveMessage(ClientKeepAliveMessageContent),
CloseMessage(CanisterCloseMessageContent),
}Expand description
A service message sent by the CDK to the client or vice versa.
Note: You should only use this struct in tests.
Variants§
OpenMessage(CanisterOpenMessageContent)
Message sent by the canister when a client opens a connection.
AckMessage(CanisterAckMessageContent)
Message sent periodically by the canister to the client to acknowledge the messages received.
KeepAliveMessage(ClientKeepAliveMessageContent)
Message sent by the client in response to an acknowledgement message from the canister.
CloseMessage(CanisterCloseMessageContent)
Message sent by the canister when it wants to close the connection.
Implementations§
source§impl WebsocketServiceMessageContent
impl WebsocketServiceMessageContent
pub fn from_candid_bytes(bytes: &[u8]) -> Result<Self, String>
Trait Implementations§
source§impl<'de> Deserialize<'de> for WebsocketServiceMessageContent
impl<'de> Deserialize<'de> for WebsocketServiceMessageContent
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
source§impl PartialEq for WebsocketServiceMessageContent
impl PartialEq for WebsocketServiceMessageContent
source§fn eq(&self, other: &WebsocketServiceMessageContent) -> bool
fn eq(&self, other: &WebsocketServiceMessageContent) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for WebsocketServiceMessageContent
impl StructuralEq for WebsocketServiceMessageContent
impl StructuralPartialEq for WebsocketServiceMessageContent
Auto Trait Implementations§
impl RefUnwindSafe for WebsocketServiceMessageContent
impl Send for WebsocketServiceMessageContent
impl Sync for WebsocketServiceMessageContent
impl Unpin for WebsocketServiceMessageContent
impl UnwindSafe for WebsocketServiceMessageContent
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