Skip to main content

TestSinkNodeTensor

Struct TestSinkNodeTensor 

Source
pub struct TestSinkNodeTensor { /* private fields */ }
Expand description

test sink

Implementations§

Source§

impl TestSinkNodeTensor

Source

pub const fn new( node_capabilities: NodeCapabilities, node_policy: NodePolicy, input_placement_acceptance: [PlacementAcceptance; 1], printer: fn(&str), ) -> Self

new

Source

pub fn processed(&self) -> &u32

Returns the number of messages this sink has pushed out thhe graph

Trait Implementations§

Source§

impl Sink<Tensor<u32, TEST_TENSOR_ELEMENT_COUNT, 2>, 1> for TestSinkNodeTensor

Source§

type Error = Infallible

Sink-specific error type for open() or consume().
Source§

fn open(&mut self) -> Result<(), Self::Error>

Prepare the sink for consumption (open file/device, connect network, etc.). Read more
Source§

fn consume(&mut self, msg: &Message<TestTensor>) -> Result<(), Self::Error>

Consume a single message pulled from port. Read more
Source§

fn input_acceptance(&self) -> [PlacementAcceptance; 1]

Input placement acceptances for zero-copy compatibility.
Source§

fn capabilities(&self) -> NodeCapabilities

Describe sink capabilities (device streams, degrade tiers, etc.).
Source§

fn policy(&self) -> NodePolicy

Provide the node policy bundle (batching/budget/deadlines).
Source§

fn select_input(&mut self, occ: &[EdgeOccupancy; IN]) -> Option<usize>

Optional: choose which input to read this step based on occupancies. Read more

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 = 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.