Crate siderite[][src]

A simple wrapper for the Meteor DDP protocol.

let connection = siderite::Connection::connect("wss://").await?;
// Make a RPC task in an independant task:
let handle = connection.handle();
tokio::spawn(async move {
    let r ="login", vec!["username".into(), "my-secret-token".into()])
                       .await?;  // this throws if the RPC call could not complete
                       .map_err(|e| eprintln!("Login failed with reason: {}", e))?


// Consume the stream
while let Some(msg) = connection.recv().await {
   match msg {
      ServerMessage::Added{..} => { ... }


pub use connection::Connection;
pub use connection::Handle;
pub use protocol::ClientMessage;
pub use protocol::ServerMessage;
pub use protocol::Timestamp;



This offers an async interface for connecting to a DDP endpoint and exchange messages.


This contains the message types defined in the DDP spec This module contains the serde datastructures for DDP