pub enum ClientMessage {
Subscribe {
topics: Vec<String>,
},
Unsubscribe {
topics: Vec<String>,
},
Write {
topic: String,
payload: Value,
},
Ping,
Query {
id: String,
pattern: String,
from: Option<u64>,
to: Option<u64>,
limit: Option<usize>,
},
ListTopics {
id: String,
},
}Expand description
A message received from a WebSocket client.
Variants§
Subscribe
Subscribe to one or more topics (wildcards supported).
Unsubscribe
Unsubscribe from one or more topics.
Write
Write a value to an inbound record (link_from("ws://…")).
Ping
Keepalive ping.
Query
Query historical / persisted records.
The server responds with ServerMessage::QueryResult carrying the
same id for correlation.
Fields
ListTopics
Request the list of topics served by this WebSocket endpoint.
The server responds with ServerMessage::TopicList carrying the
same id for correlation.
Trait Implementations§
Source§impl Clone for ClientMessage
impl Clone for ClientMessage
Source§fn clone(&self) -> ClientMessage
fn clone(&self) -> ClientMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClientMessage
impl Debug for ClientMessage
Source§impl<'de> Deserialize<'de> for ClientMessage
impl<'de> Deserialize<'de> for ClientMessage
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 ClientMessage
impl PartialEq for ClientMessage
Source§impl Serialize for ClientMessage
impl Serialize for ClientMessage
impl StructuralPartialEq for ClientMessage
Auto Trait Implementations§
impl Freeze for ClientMessage
impl RefUnwindSafe for ClientMessage
impl Send for ClientMessage
impl Sync for ClientMessage
impl Unpin for ClientMessage
impl UnsafeUnpin for ClientMessage
impl UnwindSafe for ClientMessage
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