Trait StaticArrayOpBuilder

Source
pub trait StaticArrayOpBuilder: Dataflow {
    // Provided methods
    fn add_static_array_get(
        &mut self,
        elem_ty: Type,
        array: Wire,
        index: Wire,
    ) -> Result<Wire, BuildError> { ... }
    fn add_static_array_len(
        &mut self,
        elem_ty: Type,
        array: Wire,
    ) -> Result<Wire, BuildError> { ... }
}
Expand description

A trait for building static array operations in a dataflow graph.

Provided Methods§

Source

fn add_static_array_get( &mut self, elem_ty: Type, array: Wire, index: Wire, ) -> Result<Wire, BuildError>

Adds a get operation to retrieve an element from a static array.

§Arguments
  • elem_ty - The type of the elements in the array.
  • array - The wire carrying the array.
  • index - The wire carrying the index.
§Returns

Returns a Result containing the wire for the retrieved element or a BuildError.

Source

fn add_static_array_len( &mut self, elem_ty: Type, array: Wire, ) -> Result<Wire, BuildError>

Adds a len operation to get the length of a static array.

§Arguments
  • elem_ty - The type of the elements in the array.
  • array - The wire representing the array.
§Returns

Returns a Result containing the wire for the length of the array or a BuildError.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§