pub struct Function { /* private fields */ }
Expand description

Function is a grouping of operations with defined inputs and outputs. Once created and added to graphs, functions can be invoked by creating an operation whose operation type matches the function name.

Implementations

Returns a serialized representation of the function (as a FunctionDef protocol message).

May fail on very large graphs in the future.

Construct and return the function whose FunctionDef representation is serialized in proto. Returns a newly created Function instance.

Sets function attribute named attr_name to value stored in proto. If this attribute is already set to another value, it is overriden. proto should be a sequence of bytes representing a binary serialization of an AttrValue protocol buffer.

Returns the binary-serialized AttrValue proto representation of the value of the attr_name attr of the function. If attr_name attribute is not present, returns an error.

Returns the name of the graph function.

Trait Implementations

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.