pub struct ControlClient {
pub device_id: Uuid,
pub crypto: ControlCrypto,
pub session_id: Uuid,
}Expand description
Control-plane client helper to build authenticated envelopes and handle acks.
Fields§
§device_id: Uuid§crypto: ControlCrypto§session_id: UuidImplementations§
Source§impl ControlClient
impl ControlClient
pub fn new(device_id: Uuid, session_id: Uuid, crypto: ControlCrypto) -> Self
pub fn envelope( &self, seq: u64, op: ControlOp, payload: Value, ) -> Result<ControlEnvelope, HandshakeError>
pub async fn send<T: HandshakeTransport + Send>( &self, channel: &mut ReliableControlChannel<T>, op: ControlOp, payload: Value, ) -> Result<Acknowledge, HandshakeError>
pub fn now_ms() -> u64
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ControlClient
impl RefUnwindSafe for ControlClient
impl Send for ControlClient
impl Sync for ControlClient
impl Unpin for ControlClient
impl UnwindSafe for ControlClient
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