StreamRow

Struct StreamRow 

Source
pub(crate) struct StreamRow {
Show 20 fields pub(crate) id: i64, pub(crate) reflector: String, pub(crate) module: String, pub(crate) protocol: String, pub(crate) stream_id: i32, pub(crate) callsign: String, pub(crate) suffix: Option<String>, pub(crate) ur_call: Option<String>, pub(crate) dstar_text: Option<String>, pub(crate) dprs_lat: Option<f64>, pub(crate) dprs_lon: Option<f64>, pub(crate) started_at: DateTime<Utc>, pub(crate) ended_at: Option<DateTime<Utc>>, pub(crate) frame_count: Option<i32>, pub(crate) audio_mp3: Option<Vec<u8>>, pub(crate) upload_status: Option<String>, pub(crate) upload_attempts: Option<i32>, pub(crate) last_upload_error: Option<String>, pub(crate) uploaded_at: Option<DateTime<Utc>>, pub(crate) created_at: Option<DateTime<Utc>>,
}
Expand description

A single row from the streams table.

Maps directly to the table columns via sqlx::FromRow. The audio_mp3 field is Option<Vec<u8>> because it starts as NULL and is filled in after MP3 encoding completes.

Fields§

§id: i64

Auto-generated row identifier, used as the stream’s database primary key.

§reflector: String

Reflector callsign where this stream was captured.

§module: String

Module letter (A-Z) the stream was received on.

§protocol: String

D-STAR protocol used: "dplus", "dextra", or "dcs".

§stream_id: i32

D-STAR stream ID (non-zero u16 on wire, stored as i32 for Postgres INTEGER compatibility).

§callsign: String

Operator callsign extracted from the D-STAR header my_callsign field.

§suffix: Option<String>

Operator suffix (4 bytes from my_suffix), if present.

§ur_call: Option<String>

UR (destination) callsign from the D-STAR header.

§dstar_text: Option<String>

Slow-data text message decoded from the voice frames.

§dprs_lat: Option<f64>

DPRS latitude, if a position report was embedded in the slow data.

§dprs_lon: Option<f64>

DPRS longitude, if a position report was embedded in the slow data.

§started_at: DateTime<Utc>

When the first voice frame was received.

§ended_at: Option<DateTime<Utc>>

When the stream ended (EOT received or timeout). None while the stream is still in progress.

§frame_count: Option<i32>

Number of voice frames captured.

§audio_mp3: Option<Vec<u8>>

Decoded MP3 audio blob. None until encoding completes.

§upload_status: Option<String>

Upload lifecycle state: "pending", "uploaded", or "failed".

§upload_attempts: Option<i32>

Number of upload attempts made so far.

§last_upload_error: Option<String>

Error message from the most recent failed upload attempt.

§uploaded_at: Option<DateTime<Utc>>

When the stream was successfully uploaded to the Rdio API.

§created_at: Option<DateTime<Utc>>

When this row was first inserted.

Trait Implementations§

Source§

impl Debug for StreamRow

Source§

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

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

impl From<StreamRow> for StreamView

Source§

fn from(row: StreamRow) -> Self

Converts to this type from the input type.
Source§

impl<'a, R: Row> FromRow<'a, R> for StreamRow
where &'a str: ColumnIndex<R>, i64: Decode<'a, R::Database> + Type<R::Database>, String: Decode<'a, R::Database> + Type<R::Database>, i32: Decode<'a, R::Database> + Type<R::Database>, Option<String>: Decode<'a, R::Database> + Type<R::Database>, Option<f64>: Decode<'a, R::Database> + Type<R::Database>, DateTime<Utc>: Decode<'a, R::Database> + Type<R::Database>, Option<DateTime<Utc>>: Decode<'a, R::Database> + Type<R::Database>, Option<i32>: Decode<'a, R::Database> + Type<R::Database>, Option<Vec<u8>>: Decode<'a, R::Database> + Type<R::Database>,

Source§

fn from_row(__row: &'a R) -> Result<Self>

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.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
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.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,