hugr_core::extension

Module prelude

source
Expand description

Prelude extension - available in all contexts, defining common types, operations and constants.

Re-exports§

Modules§

  • Array type and operations.

Structs§

  • Structure for holding constant usize values.
  • A structure for holding references to external symbols.
  • Structure for holding constant string values.
  • Structure for holding constant usize values.
  • A node which adds a extension req to the types of the wires it is passed It has no effect on the values passed along the edge
  • A lift operation definition.
  • An operation that packs all its inputs into a tuple.
  • A no-op operation.
  • A no-op operation definition.
  • Prelude extension
  • An extension registry containing only the prelude
  • An iterator over the variants of TupleOpDef
  • An operation that unpacks a tuple into its components.

Enums§

Constants§

Functions§

  • A constant Either value with a failure variant.
  • A constant Either with a row of failure values.
  • A constant Either value with a left variant.
  • A constant Either value with a row of left values.
  • A constant optional value with no value.
  • A constant Either value with a success variant.
  • A constant Either with a row of success values.
  • A constant Either value with a right variant.
  • A constant Either value with a row of right values.
  • A constant optional value with a given value.
  • A constant optional value with a row of values.
  • An “either” type, i.e. a Sum type with a “left” and a “right” variant.
  • An optional type, i.e. a Sum type with the second variant as the given type and the first as an empty tuple.
  • Return a Sum type with the second variant as the given type and the first an Error.