Skip to main content

RecordingSession

Struct RecordingSession 

Source
pub struct RecordingSession {
    pub session_id: [u8; 16],
    pub service: String,
    pub admin_key_id: String,
    pub started_at: Instant,
    pub last_packet_at: Instant,
    pub packets: Vec<PacketMetadata>,
    pub total_packets: u64,
    pub running_stats: RunningStats,
}
Expand description

Active recording session on the server

Fields§

§session_id: [u8; 16]

Unique session ID (from VPN session)

§service: String

Service name being recorded (e.g. “yandex_telemost”)

§admin_key_id: String

Admin key ID that authorized this recording

§started_at: Instant

When recording started

§last_packet_at: Instant

When the most recent packet was captured

§packets: Vec<PacketMetadata>

Collected packet metadata (capped at MAX_RECORDING_PACKETS)

§total_packets: u64

Total packets observed (may exceed stored packets)

§running_stats: RunningStats

Incremental statistics (always up to date)

Implementations§

Source§

impl RecordingSession

Source

pub fn new(session_id: [u8; 16], service: String, admin_key_id: String) -> Self

Create a new recording session

Source

pub fn record(&mut self, meta: PacketMetadata)

Record a packet’s metadata

Source

pub fn has_enough_data(&self) -> bool

Check if we have enough data for mask generation

Source

pub fn duration_secs(&self) -> u64

Get recording duration in seconds

Source

pub fn is_idle_timed_out(&self, idle_timeout_secs: u64) -> bool

Check whether the session has been idle long enough to auto-finish.

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> 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, 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