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

for downcasting
Source§

fn init( &mut self, block_id: BlockId, port_id: PortId, inbox: Sender<BlockMessage>, )

Initialize buffer Read more
Source§

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

Check if connected
Source§

fn notify_finished<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

notify upstream that we are done
Source§

fn finish(&mut self)

The upstream is done Read more
Source§

fn finished(&self) -> bool

Did the upstream already mark this buffer as done.
Source§

fn block_id(&self) -> BlockId

Own Block ID
Source§

fn port_id(&self) -> PortId

Own Port ID
Source§

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

Source§

type Item = T

Buffer Items
Source§

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

Get available samples and tags.
Source§

fn consume(&mut self, n: usize)

Consume Items
Source§

fn set_min_items(&mut self, _n: usize)

Configure the minimum numer of items required in work() Read more
Source§

fn set_min_buffer_size_in_items(&mut self, _n: usize)

Configure the minimum buffer size Read more
Source§

fn max_items(&self) -> usize

Maximum number of items that fit in the buffer
Source§

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

Get available samples.
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

Items in the reader
Source§

type Buffer = Buffer<T>

Buffer type
Source§

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

Get next buffer
Source§

fn has_more_buffers(&mut self) -> bool

Has more full buffers
Source§

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

Put an empty buffer to circle it back 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> !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,