Skip to main content

Reader

Struct Reader 

Source
pub struct Reader<T>
where T: CpuSample,
{ /* private fields */ }
Expand description

Circuit Reader

Implementations§

Source§

impl<T> Reader<T>
where T: CpuSample,

Source

pub fn new() -> Self

Create circuit buffer reader

Trait Implementations§

Source§

impl<T> BufferReader for Reader<T>
where T: CpuSample,

Source§

fn as_any_mut(&mut self) -> &mut dyn Any

Return this reader as Any for runtime downcasting.
Source§

fn init(&mut self, block_id: BlockId, port_id: PortId, inbox: BlockInbox)

Initialize the reader with its owning block, port id, and inbox.
Source§

fn validate(&self) -> Result<(), Error>

Validate that this reader is connected and ready to run. Read more
Source§

async fn notify_finished(&mut self)

Notify upstream writers that this reader is done. Read more
Source§

fn finish(&mut self)

Mark this reader because the upstream writer is done.
Source§

fn finished(&self) -> bool

Return whether the upstream writer has marked this buffer as done.
Source§

fn block_id(&self) -> BlockId

Get the owning block id.
Source§

fn port_id(&self) -> PortId

Get the owning port id.
Source§

impl<T> CpuBufferReader for Reader<T>
where T: CpuSample,

Source§

type Item = T

Item type.
Source§

fn slice_with_tags(&mut self) -> (&[Self::Item], &Vec<ItemTag>)

Get readable slice and associated tags. Read more
Source§

fn consume(&mut self, n: usize)

Mark n items as consumed. Read more
Source§

fn set_min_items(&mut self, _n: usize)

Set minimum number of readable items.
Source§

fn set_min_buffer_size_in_items(&mut self, _n: usize)

Set minimum buffer size.
Source§

fn max_items(&self) -> usize

Return the maximum number of items that fit in the buffer.
Source§

fn slice(&mut self) -> &[Self::Item]

Get readable slice.
Source§

impl<T> Default for Reader<T>
where T: CpuSample,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<T> InplaceReader for Reader<T>
where T: CpuSample,

Source§

type Item = T

Item type carried by this in-place reader.
Source§

type Buffer = Buffer<T>

Buffer chunk type moved through this reader.
Source§

fn get_full_buffer(&mut self) -> Option<Self::Buffer>

Get the next full buffer, if one is available.
Source§

fn has_more_buffers(&mut self) -> bool

Return whether more full buffers are immediately available.
Source§

fn put_empty_buffer(&mut self, buffer: Self::Buffer)

Return an empty buffer to the beginning of the circuit.
Source§

fn notify_consumed_buffer(&mut self)

Notify the circuit start that we consumed a buffer.

Auto Trait Implementations§

§

impl<T> Freeze for Reader<T>

§

impl<T> !RefUnwindSafe for Reader<T>

§

impl<T> Send for Reader<T>

§

impl<T> Sync for Reader<T>

§

impl<T> Unpin for Reader<T>

§

impl<T> UnsafeUnpin for Reader<T>

§

impl<T> !UnwindSafe for Reader<T>

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

Source§

impl<T> SendCpuBufferReader for T

Source§

impl<T> SendInplaceReader for T