pub struct ReaderHandle<E: Encoding = FlatBuffers> { /* private fields */ }Expand description
The &self port roles: Attached, Clock, SignalReader,
FixedReader, and the two signal extensions.
It is Send + Sync, so several threads may hold one and read at once, and
a face that needs only SignalReader can be built over this handle
directly rather than over the aggregate: like every handle, it carries the
runtime’s encoding E, which such a face reads from it.
Trait Implementations§
Source§impl<E: Encoding> Attached for ReaderHandle<E>
impl<E: Encoding> Attached for ReaderHandle<E>
Source§fn catalog(&self) -> &CatalogRef
fn catalog(&self) -> &CatalogRef
The catalog this port serves.
Source§impl<E: Encoding> Clock for ReaderHandle<E>
impl<E: Encoding> Clock for ReaderHandle<E>
Source§impl<E: Encoding> CoherentSignals for ReaderHandle<E>
impl<E: Encoding> CoherentSignals for ReaderHandle<E>
Source§fn read_coherent(
&self,
iface: InterfaceNo,
ords: &[Ordinal],
out: &mut [u8],
samples: &mut [RawSample],
) -> Result<usize, ReadError>
fn read_coherent( &self, iface: InterfaceNo, ords: &[Ordinal], out: &mut [u8], samples: &mut [RawSample], ) -> Result<usize, ReadError>
Answers every ordinal in
ords from one publication. Copies the values
into out one after another, writes one RawSample for each ordinal
into samples in the order of ords, and returns the number of bytes
written to out. Read moreSource§impl<E: Encoding> Encoded for ReaderHandle<E>
impl<E: Encoding> Encoded for ReaderHandle<E>
Source§impl<E: Encoding> FixedReader for ReaderHandle<E>
impl<E: Encoding> FixedReader for ReaderHandle<E>
Source§fn read_fixed(
&self,
iface: InterfaceNo,
ord: Ordinal,
out: &mut [u8],
) -> Result<usize, ReadError>
fn read_fixed( &self, iface: InterfaceNo, ord: Ordinal, out: &mut [u8], ) -> Result<usize, ReadError>
Copies the provisioned value into the front of
out and returns its
length.Source§impl<E: Encoding> ScannableSignals for ReaderHandle<E>
impl<E: Encoding> ScannableSignals for ReaderHandle<E>
Source§fn generation(&self, iface: InterfaceNo) -> u64
fn generation(&self, iface: InterfaceNo) -> u64
The interface’s generation: a counter that each commit to the interface
increments. Read more
Source§fn scan(&self, marks: &mut [Watermark], out: &mut [Changed]) -> usize
fn scan(&self, marks: &mut [Watermark], out: &mut [Changed]) -> usize
Writes the changes into
out, interface by interface, in the order of
marks, and updates marks. An interface’s changes are written all
together or not at all: when they do not fit in the rest of out,
none of them is written, that interface’s mark is not updated, and
scan returns the number of entries written so far. Read moreSource§impl<E: Encoding> SignalReader for ReaderHandle<E>
impl<E: Encoding> SignalReader for ReaderHandle<E>
Auto Trait Implementations§
impl<E> Freeze for ReaderHandle<E>where
PhantomData<E>: Freeze,
impl<E> RefUnwindSafe for ReaderHandle<E>where
PhantomData<E>: RefUnwindSafe,
impl<E> Send for ReaderHandle<E>where
PhantomData<E>: Send,
impl<E> Sync for ReaderHandle<E>where
PhantomData<E>: Sync,
impl<E> Unpin for ReaderHandle<E>where
PhantomData<E>: Unpin,
impl<E> UnsafeUnpin for ReaderHandle<E>where
PhantomData<E>: UnsafeUnpin,
impl<E> UnwindSafe for ReaderHandle<E>where
PhantomData<E>: UnwindSafe,
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