Struct tfrecord::protos::op_def::AttrDef[][src]

pub struct AttrDef {
    pub name: String,
    pub type: String,
    pub default_value: Option<AttrValue>,
    pub description: String,
    pub has_minimum: bool,
    pub minimum: i64,
    pub allowed_values: Option<AttrValue>,
}

Description of the graph-construction-time configuration of this Op. That is to say, this describes the attr fields that will be specified in the NodeDef.

Fields

name: String

A descriptive name for the argument. May be used, e.g. by the Python client, as a keyword argument name, and so should match the regexp “[a-z][a-z0-9_]+”.

type: String

One of the type names from attr_value.proto (“string”, “list(string)”, “int”, etc.).

default_value: Option<AttrValue>

A reasonable default for this attribute if the user does not supply a value. If not specified, the user must supply a value.

description: String

Human-readable description.

has_minimum: bool

For type == “int”, this is a minimum value. For “list(___)” types, this is the minimum length.

minimum: i64allowed_values: Option<AttrValue>

The set of allowed values. Has type that is the “list” version of the “type” field above (uses the “list” field of AttrValue). If type == “type” or “list(type)” above, then the “type” field of “allowed_values.list” has the set of allowed DataTypes. If type == “string” or “list(string)”, then the “s” field of “allowed_values.list” has the set of allowed strings.

Trait Implementations

impl Clone for AttrDef[src]

impl Debug for AttrDef[src]

impl Default for AttrDef[src]

impl<'de> Deserialize<'de> for AttrDef[src]

impl Message for AttrDef[src]

impl PartialEq<AttrDef> for AttrDef[src]

impl Serialize for AttrDef[src]

impl StructuralPartialEq for AttrDef[src]

Auto Trait Implementations

impl RefUnwindSafe for AttrDef

impl Send for AttrDef

impl Sync for AttrDef

impl Unpin for AttrDef

impl UnwindSafe for AttrDef

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,