pub struct ChannelMessage {
pub payload: Vec<u8>,
pub channel: ChannelKind,
pub source: String,
pub timestamp: u64,
pub sim_origin: bool,
pub quality_score: f32,
}Fields§
§payload: Vec<u8>§channel: ChannelKind§source: String§timestamp: u64§sim_origin: bool§quality_score: f32Implementations§
Source§impl ChannelMessage
impl ChannelMessage
pub fn new(channel: ChannelKind, source: &str, payload: &[u8]) -> Self
pub fn from_sim(channel: ChannelKind, source: &str, payload: &[u8]) -> Self
pub fn with_quality(self, q: f32) -> Self
Trait Implementations§
Source§impl Clone for ChannelMessage
impl Clone for ChannelMessage
Source§fn clone(&self) -> ChannelMessage
fn clone(&self) -> ChannelMessage
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 moreAuto Trait Implementations§
impl Freeze for ChannelMessage
impl RefUnwindSafe for ChannelMessage
impl Send for ChannelMessage
impl Sync for ChannelMessage
impl Unpin for ChannelMessage
impl UnsafeUnpin for ChannelMessage
impl UnwindSafe for ChannelMessage
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