pub enum OwnedFrame {
V3 {
sequence: SequenceNumber,
payload: Vec<u8>,
},
V4 {
format: PayloadFormat,
subformat: PayloadSubformat,
sequence: SequenceNumber,
station_id: String,
payload: Vec<u8>,
},
}Expand description
An owned SeedLink frame with its payload copied to the heap.
Variants§
V3
SeedLink v3 frame (8-byte header + 512-byte miniSEED).
Fields
§
sequence: SequenceNumber6-digit hex sequence number.
V4
SeedLink v4 frame with variable-length payload.
Fields
§
format: PayloadFormatPayload format indicator.
§
subformat: PayloadSubformatPayload sub-format indicator.
§
sequence: SequenceNumber20-digit decimal sequence number.
Implementations§
Source§impl OwnedFrame
impl OwnedFrame
Sourcepub fn sequence(&self) -> SequenceNumber
pub fn sequence(&self) -> SequenceNumber
Returns the sequence number of this frame.
Sourcepub fn station_key(&self) -> Option<StationKey>
pub fn station_key(&self) -> Option<StationKey>
Extract the station key (network + station) from the frame.
For V3, parses station (bytes 8–12) and network (bytes 18–19) from the
miniSEED payload header. For V4, splits station_id on '_'.
Returns None if the payload is too short or station info is unreadable.
Sourcepub fn decode(&self) -> Result<DataFrame>
pub fn decode(&self) -> Result<DataFrame>
Decode the payload as a miniSEED record.
Delegates to RawFrame::decode() on a borrowed view of this frame.
Trait Implementations§
Source§impl Clone for OwnedFrame
impl Clone for OwnedFrame
Source§fn clone(&self) -> OwnedFrame
fn clone(&self) -> OwnedFrame
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OwnedFrame
impl Debug for OwnedFrame
Source§impl<'a> From<RawFrame<'a>> for OwnedFrame
impl<'a> From<RawFrame<'a>> for OwnedFrame
Source§impl PartialEq for OwnedFrame
impl PartialEq for OwnedFrame
impl Eq for OwnedFrame
impl StructuralPartialEq for OwnedFrame
Auto Trait Implementations§
impl Freeze for OwnedFrame
impl RefUnwindSafe for OwnedFrame
impl Send for OwnedFrame
impl Sync for OwnedFrame
impl Unpin for OwnedFrame
impl UnwindSafe for OwnedFrame
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