Struct AddOp

Source
pub struct AddOp { /* private fields */ }

Implementations§

Source§

impl AddOp

Source

pub fn new(a: i32) -> Self

Trait Implementations§

Source§

impl Debug for AddOp

Source§

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

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

impl DefaultName for AddOp

Source§

fn default_name() -> Cow<'static, str>

Returns the default name for an item. Cow<'static, str> allows owned or static string.
Source§

impl Named for AddOp

Source§

fn name(&self) -> Cow<'_, str>

Returns the name associated with self. We use Cow to allow both owned and borrowed strings.
Source§

impl Operator<AddOpIO> for AddOp

Source§

fn output_port_connection_required(&self, port: usize) -> bool

NOTE: typically, we do not require that outputs from any given operator be connected. perhaps this design choice may be changed in the future

Source§

fn opcode(&self) -> Arc<dyn OpCode>

Returns the operation code, which can be used to inform specialized handling or diagnostics.
Source§

fn input_count(&self) -> usize

How many actual inputs does this operator need?
Source§

fn output_count(&self) -> usize

How many outputs does this operator produce?
Source§

fn input_port_type_str(&self, port: usize) -> Option<&'static str>

used by the network! dag compiler to verify that the input port of one operator is compatible with the data flowing into it from the output port of another operator
Source§

fn output_port_type_str(&self, port: usize) -> Option<&'static str>

used by the network! dag compiler to verify that the output port of one operator is compatible with the data required by the input port of its downstream operator
Source§

fn input_port_connection_required(&self, port: usize) -> bool

used by the network! dag compiler to verify that this input port needs an output connection
Source§

fn execute<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, execute_inputs: [Option<&'life1 AddOpIO>; 4], execute_outputs: &'life2 mut [Option<AddOpIO>; 4], ) -> Pin<Box<dyn Future<Output = NetResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

The big 4×4 method: You receive up to 4 inputs and must fill up to 4 outputs.
Source§

impl ResetName for AddOp

Source§

fn reset_name(&mut self) -> Result<(), NameError>

Resets the name to the default, handling potential errors.
Source§

impl SetName for AddOp

Source§

fn set_name(&mut self, name: &str) -> Result<(), NameError>

Sets the name of the item. Returns a Result to handle invalid inputs.

Auto Trait Implementations§

§

impl Freeze for AddOp

§

impl RefUnwindSafe for AddOp

§

impl Send for AddOp

§

impl Sync for AddOp

§

impl Unpin for AddOp

§

impl UnwindSafe for AddOp

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

Source§

const ACK_1_1_0: bool = true

Whether this implementor has acknowledged the 1.1.0 update to unerase’s documented implementation requirements. Read more
Source§

unsafe fn unerase(this: NonNull<Erased>) -> NonNull<T>

Unerase this erased pointer. Read more
Source§

fn erase(this: NonNull<Self>) -> NonNull<Erased>

Turn this erasable pointer into an erased pointer. 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, NetworkItem> IntoArcOperator<NetworkItem> for T
where T: Operator<NetworkItem> + 'static, NetworkItem: Debug + Send + Sync,

Source§

fn into_arc_operator(self) -> Arc<dyn Operator<NetworkItem>>

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