pub struct PdEventStream {
pub preamble: PdStatus,
pub events: Vec<PdEvent>,
}Expand description
Complete PD event stream with preamble and events
Fields§
§preamble: PdStatusMeasurements captured immediately before the event records.
events: Vec<PdEvent>Implementations§
Source§impl PdEventStream
impl PdEventStream
Sourcepub fn from_bytes(bytes: Bytes) -> Result<Self, KMError>
pub fn from_bytes(bytes: Bytes) -> Result<Self, KMError>
Parse PD event stream from bytes Expected format: 12-byte preamble + repeated (6-byte header + wire data) events
Sourcepub fn pd_messages(&self) -> impl Iterator<Item = (&Time, u8, &[u8])>
pub fn pd_messages(&self) -> impl Iterator<Item = (&Time, u8, &[u8])>
Helper: get all PD messages, ignoring connection events
Sourcepub fn connection_events(&self) -> impl Iterator<Item = (&Time, bool)>
pub fn connection_events(&self) -> impl Iterator<Item = (&Time, bool)>
Helper: get connection state changes
Trait Implementations§
Source§impl Clone for PdEventStream
impl Clone for PdEventStream
Source§impl Debug for PdEventStream
impl Debug for PdEventStream
Source§impl PartialEq for PdEventStream
impl PartialEq for PdEventStream
impl StructuralPartialEq for PdEventStream
Auto Trait Implementations§
impl Freeze for PdEventStream
impl RefUnwindSafe for PdEventStream
impl Send for PdEventStream
impl Sync for PdEventStream
impl Unpin for PdEventStream
impl UnsafeUnpin for PdEventStream
impl UnwindSafe for PdEventStream
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