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: i64Auto-generated row identifier, used as the stream’s database primary key.
reflector: StringReflector callsign where this stream was captured.
module: StringModule letter (A-Z) the stream was received on.
protocol: StringD-STAR protocol used: "dplus", "dextra", or "dcs".
stream_id: i32D-STAR stream ID (non-zero u16 on wire, stored as i32 for Postgres
INTEGER compatibility).
callsign: StringOperator 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 From<StreamRow> for StreamView
impl From<StreamRow> for StreamView
Source§impl<'a, R: Row> FromRow<'a, R> for StreamRowwhere
&'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>,
impl<'a, R: Row> FromRow<'a, R> for StreamRowwhere
&'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>,
Auto Trait Implementations§
impl Freeze for StreamRow
impl RefUnwindSafe for StreamRow
impl Send for StreamRow
impl Sync for StreamRow
impl Unpin for StreamRow
impl UnwindSafe for StreamRow
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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