Skip to main content

ControlPayload

Enum ControlPayload 

Source
pub enum ControlPayload {
Show 17 variants KeyRotate { new_eph_pub: [u8; 32], }, MaskUpdate { mask_data: Vec<u8>, signature: [u8; 64], }, Keepalive, TelemetryRequest { metric_flags: u8, }, TelemetryResponse { packet_loss: u16, rtt_ms: u16, jitter_ms: u16, buffer_pct: u8, }, TimeSync { server_ts_ms: u64, }, Shutdown { reason: u8, }, ControlAck { ack_seq: u16, ack_for_subtype: u8, }, ServerHello { server_eph_pub: [u8; 32], signature: [u8; 64], network_config: Option<ClientNetworkConfig>, }, RecordingStart { service: String, }, RecordingAck { session_id: [u8; 16], status: String, }, RecordingStop { session_id: [u8; 16], }, RecordingComplete { service: String, mask_id: String, confidence: f32, }, RecordingFailed { reason: String, }, RecordingStatusRequest, RecordingStatus { can_record: bool, active_service: Option<String>, }, BootstrapDescriptorUpdate { descriptor_data: Vec<u8>, },
}
Expand description

Control message payload

Variants§

§

KeyRotate

Fields

§new_eph_pub: [u8; 32]
§

MaskUpdate

Fields

§mask_data: Vec<u8>
§signature: [u8; 64]
§

Keepalive

§

TelemetryRequest

Fields

§metric_flags: u8
§

TelemetryResponse

Fields

§packet_loss: u16
§rtt_ms: u16
§jitter_ms: u16
§buffer_pct: u8
§

TimeSync

Fields

§server_ts_ms: u64
§

Shutdown

Fields

§reason: u8
§

ControlAck

Fields

§ack_seq: u16
§ack_for_subtype: u8
§

ServerHello

Fields

§server_eph_pub: [u8; 32]
§signature: [u8; 64]
§network_config: Option<ClientNetworkConfig>
§

RecordingStart

Admin requests recording start for a service

Fields

§service: String
§

RecordingAck

Server acknowledges recording start

Fields

§session_id: [u8; 16]
§status: String
§

RecordingStop

Admin requests recording stop

Fields

§session_id: [u8; 16]
§

RecordingComplete

Server reports mask generation complete

Fields

§service: String
§mask_id: String
§confidence: f32
§

RecordingFailed

Server reports recording/generation failure

Fields

§reason: String
§

RecordingStatusRequest

Client asks whether the current authenticated session may record masks.

§

RecordingStatus

Server reports recording capability and current active recording state.

Fields

§can_record: bool
§active_service: Option<String>
§

BootstrapDescriptorUpdate

Fields

§descriptor_data: Vec<u8>

Implementations§

Source§

impl ControlPayload

Source

pub fn encode(&self) -> Result<Vec<u8>>

Source

pub fn decode(data: &[u8]) -> Result<Self>

Trait Implementations§

Source§

impl Clone for ControlPayload

Source§

fn clone(&self) -> ControlPayload

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ControlPayload

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ControlPayload

Source§

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 Serialize for ControlPayload

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V