pub struct BestEffortReader { /* private fields */ }Expand description
Best-Effort Reader.
Stateless except for the own GUID + the accepted writer GUID.
Phase 0: 1:1 model. Forward-compatible with a multi-writer setup, because
recv_datagram delivers each DATA submessage individually and the
filter logic can live in the caller.
Implementations§
Source§impl BestEffortReader
impl BestEffortReader
Sourcepub fn new(participant_prefix: GuidPrefix, reader_id: EntityId) -> Self
pub fn new(participant_prefix: GuidPrefix, reader_id: EntityId) -> Self
Constructs a reader.
Sourcepub fn recv_datagram(
&self,
datagram: &[u8],
) -> Result<Vec<DeliveredSample>, WireError>
pub fn recv_datagram( &self, datagram: &[u8], ) -> Result<Vec<DeliveredSample>, WireError>
Processes an incoming datagram.
Returns a Vec of the DATA submessages directed at this reader
(matched on entity_key OR entity_kind == Unknown as a
wildcard).
§Errors
WireError if the datagram does not parse.
Trait Implementations§
Source§impl Clone for BestEffortReader
impl Clone for BestEffortReader
Source§fn clone(&self) -> BestEffortReader
fn clone(&self) -> BestEffortReader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BestEffortReader
impl RefUnwindSafe for BestEffortReader
impl Send for BestEffortReader
impl Sync for BestEffortReader
impl Unpin for BestEffortReader
impl UnsafeUnpin for BestEffortReader
impl UnwindSafe for BestEffortReader
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