pub enum Value {
    S(Vec<u8>),
    I(i64),
    F(f32),
    B(bool),
    Type(i32),
    Shape(TensorShapeProto),
    Tensor(TensorProto),
    List(ListValue),
    Func(NameAttrList),
    Placeholder(String),
}

Variants

S(Vec<u8>)

“string”

I(i64)

“int”

F(f32)

“float”

B(bool)

“bool”

Type(i32)

“type”

Shape(TensorShapeProto)

“shape”

Tensor(TensorProto)

“tensor”

List(ListValue)

any “list(…)”

Func(NameAttrList)

“func” represents a function. func.name is a function’s name or a primitive op’s name. func.attr.first is the name of an attr defined for that function. func.attr.second is the value for that attr in the instantiation.

Placeholder(String)

This is a placeholder only used in nodes defined inside a function. It indicates the attr value will be supplied when the function is instantiated. For example, let us suppose a node “N” in function “FN”. “N” has an attr “A” with value placeholder = “foo”. When FN is instantiated with attr “foo” set to “bar”, the instantiated node N’s attr A will have been given the value “bar”.

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. 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 alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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.