Mojo struct
Symbol
struct Symbol
Represents a symbolic value within a Graph
.
A Symbol
can represent the output of a node, the arguments of a Graph
(as seen from within its body), and more generally any symbolic value
available within the Graph
. Other nodes receive Symbol
values as inputs
to form a computation graph.
A Symbol
may also refer to an existing input or output of a node, and you
can change them, such as by swapping a new Symbol
.
Conceptually, a Symbol
is the equivalent of a variable in Mojo. A Symbol
can also be thought of as the end of an edge in the dataflow graph (the
other end being one use of that symbol).
Similar to a regular variable, a Symbol
has a data type.
Note: All the methods in this type are documented as "Creates foo". This is a shorthand notation for "Adds a node representing an op that returns foo".
Fields
- handle (
Value
): A handle to thisSymbol
's internal representation.
Implemented traits
AnyType
,
CollectionElement
,
Copyable
,
ExplicitlyCopyable
,
Movable
,
Stringable
,
UnknownDestructibility
,
Writable