Skip to main content

Writer

Struct Writer 

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

Circular writer

Trait Implementations§

Source§

impl<D> BufferWriter for Writer<D>
where D: CpuSample,

Source§

type Reader = Reader<D>

The corresponding local reader.
Source§

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

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

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

Validate that this writer is connected and ready to run.
Source§

fn connect(&mut self, dest: &mut Self::Reader)

Connect the writer to a matching reader. Read more
Source§

async fn notify_finished(&mut self)

Notify downstream blocks that we are done. Read more
Source§

fn block_id(&self) -> BlockId

Get the owning block id.
Source§

fn port_id(&self) -> PortId

Get the owning port id.
Source§

fn connect_dyn(&mut self, dest: &mut dyn BufferReader) -> Result<(), Error>

Connect the writer to a type-erased local reader.
Source§

impl<D> CpuBufferWriter for Writer<D>
where D: CpuSample,

Source§

type Item = D

Item type.
Source§

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

Get writable slice.
Source§

fn produce(&mut self, items: usize)

Mark n items as produced. Read more
Source§

fn slice_with_tags(&mut self) -> (&mut [Self::Item], Tags<'_>)

Get writable slice and tag sink. Read more
Source§

fn set_min_items(&mut self, n: usize)

Set minimum number of writable items.
Source§

fn set_min_buffer_size_in_items(&mut self, n: usize)

Set minimum buffer size.
Source§

fn max_items(&self) -> usize

Maximum writable items.
Source§

impl<D> Debug for Writer<D>
where D: CpuSample,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<D> Default for Writer<D>
where D: CpuSample,

Source§

fn default() -> Self

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

Auto Trait Implementations§

§

impl<D> Freeze for Writer<D>

§

impl<D> !RefUnwindSafe for Writer<D>

§

impl<D> Send for Writer<D>

§

impl<D> Sync for Writer<D>

§

impl<D> Unpin for Writer<D>

§

impl<D> UnsafeUnpin for Writer<D>

§

impl<D> !UnwindSafe for Writer<D>

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