Skip to main content

ReaderHandle

Struct ReaderHandle 

Source
pub struct ReaderHandle { /* 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.

Trait Implementations§

Source§

impl Attached for ReaderHandle

Source§

fn catalog(&self) -> &CatalogRef

The catalog this port serves.
Source§

impl Clock for ReaderHandle

Source§

fn now(&self) -> Timestamp

The current time in the platform time base.
Source§

impl CoherentSignals for ReaderHandle

Source§

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 more
Source§

impl FixedReader for ReaderHandle

Source§

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 ScannableSignals for ReaderHandle

Source§

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

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 more
Source§

impl SignalReader for ReaderHandle

Source§

fn read( &self, iface: InterfaceNo, ord: Ordinal, out: &mut [u8], ) -> Result<RawSample, ReadError>

Copies the signal’s current value into the front of out and returns its provenance, its freshness and its envelope. The runtime resolves both the provenance and the freshness. Read more
Source§

impl Wakeable for ReaderHandle

Source§

fn wake_on(&self, _: Interest, waker: &Waker)

Wakes waker when the thing what names may have changed, under the contract above.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.