pub struct AttributeProto {Show 13 fields
pub t: SingularPtrField<TensorProto>,
pub g: SingularPtrField<GraphProto>,
pub sparse_tensor: SingularPtrField<SparseTensorProto>,
pub tp: SingularPtrField<TypeProto>,
pub floats: Vec<f32>,
pub ints: Vec<i64>,
pub strings: RepeatedField<Vec<u8>>,
pub tensors: RepeatedField<TensorProto>,
pub graphs: RepeatedField<GraphProto>,
pub sparse_tensors: RepeatedField<SparseTensorProto>,
pub type_protos: RepeatedField<TypeProto>,
pub unknown_fields: UnknownFields,
pub cached_size: CachedSize,
/* private fields */
}Expand description
Generated files are compatible only with the same version of protobuf runtime.
Fields§
§t: SingularPtrField<TensorProto>§g: SingularPtrField<GraphProto>§sparse_tensor: SingularPtrField<SparseTensorProto>§tp: SingularPtrField<TypeProto>§floats: Vec<f32>§ints: Vec<i64>§strings: RepeatedField<Vec<u8>>§tensors: RepeatedField<TensorProto>§graphs: RepeatedField<GraphProto>§sparse_tensors: RepeatedField<SparseTensorProto>§type_protos: RepeatedField<TypeProto>§unknown_fields: UnknownFields§cached_size: CachedSizeImplementations§
Source§impl AttributeProto
impl AttributeProto
pub fn new() -> AttributeProto
pub fn get_name(&self) -> &str
pub fn clear_name(&mut self)
pub fn has_name(&self) -> bool
pub fn set_name(&mut self, v: String)
pub fn mut_name(&mut self) -> &mut String
pub fn take_name(&mut self) -> String
pub fn get_ref_attr_name(&self) -> &str
pub fn clear_ref_attr_name(&mut self)
pub fn has_ref_attr_name(&self) -> bool
pub fn set_ref_attr_name(&mut self, v: String)
pub fn mut_ref_attr_name(&mut self) -> &mut String
pub fn take_ref_attr_name(&mut self) -> String
pub fn get_doc_string(&self) -> &str
pub fn clear_doc_string(&mut self)
pub fn has_doc_string(&self) -> bool
pub fn set_doc_string(&mut self, v: String)
pub fn mut_doc_string(&mut self) -> &mut String
pub fn take_doc_string(&mut self) -> String
pub fn get_field_type(&self) -> AttributeProto_AttributeType
pub fn clear_field_type(&mut self)
pub fn has_field_type(&self) -> bool
pub fn set_field_type(&mut self, v: AttributeProto_AttributeType)
pub fn get_f(&self) -> f32
pub fn clear_f(&mut self)
pub fn has_f(&self) -> bool
pub fn set_f(&mut self, v: f32)
pub fn get_i(&self) -> i64
pub fn clear_i(&mut self)
pub fn has_i(&self) -> bool
pub fn set_i(&mut self, v: i64)
pub fn get_s(&self) -> &[u8] ⓘ
pub fn clear_s(&mut self)
pub fn has_s(&self) -> bool
pub fn set_s(&mut self, v: Vec<u8>)
pub fn mut_s(&mut self) -> &mut Vec<u8> ⓘ
pub fn take_s(&mut self) -> Vec<u8> ⓘ
pub fn get_t(&self) -> &TensorProto
pub fn clear_t(&mut self)
pub fn has_t(&self) -> bool
pub fn set_t(&mut self, v: TensorProto)
pub fn mut_t(&mut self) -> &mut TensorProto
pub fn take_t(&mut self) -> TensorProto
pub fn get_g(&self) -> &GraphProto
pub fn clear_g(&mut self)
pub fn has_g(&self) -> bool
pub fn set_g(&mut self, v: GraphProto)
pub fn mut_g(&mut self) -> &mut GraphProto
pub fn take_g(&mut self) -> GraphProto
pub fn get_sparse_tensor(&self) -> &SparseTensorProto
pub fn clear_sparse_tensor(&mut self)
pub fn has_sparse_tensor(&self) -> bool
pub fn set_sparse_tensor(&mut self, v: SparseTensorProto)
pub fn mut_sparse_tensor(&mut self) -> &mut SparseTensorProto
pub fn take_sparse_tensor(&mut self) -> SparseTensorProto
pub fn get_tp(&self) -> &TypeProto
pub fn clear_tp(&mut self)
pub fn has_tp(&self) -> bool
pub fn set_tp(&mut self, v: TypeProto)
pub fn mut_tp(&mut self) -> &mut TypeProto
pub fn take_tp(&mut self) -> TypeProto
pub fn get_floats(&self) -> &[f32]
pub fn clear_floats(&mut self)
pub fn set_floats(&mut self, v: Vec<f32>)
pub fn mut_floats(&mut self) -> &mut Vec<f32>
pub fn take_floats(&mut self) -> Vec<f32>
pub fn get_ints(&self) -> &[i64]
pub fn clear_ints(&mut self)
pub fn set_ints(&mut self, v: Vec<i64>)
pub fn mut_ints(&mut self) -> &mut Vec<i64>
pub fn take_ints(&mut self) -> Vec<i64>
pub fn get_strings(&self) -> &[Vec<u8>]
pub fn clear_strings(&mut self)
pub fn set_strings(&mut self, v: RepeatedField<Vec<u8>>)
pub fn mut_strings(&mut self) -> &mut RepeatedField<Vec<u8>>
pub fn take_strings(&mut self) -> RepeatedField<Vec<u8>>
pub fn get_tensors(&self) -> &[TensorProto]
pub fn clear_tensors(&mut self)
pub fn set_tensors(&mut self, v: RepeatedField<TensorProto>)
pub fn mut_tensors(&mut self) -> &mut RepeatedField<TensorProto>
pub fn take_tensors(&mut self) -> RepeatedField<TensorProto>
pub fn get_graphs(&self) -> &[GraphProto]
pub fn clear_graphs(&mut self)
pub fn set_graphs(&mut self, v: RepeatedField<GraphProto>)
pub fn mut_graphs(&mut self) -> &mut RepeatedField<GraphProto>
pub fn take_graphs(&mut self) -> RepeatedField<GraphProto>
pub fn get_sparse_tensors(&self) -> &[SparseTensorProto]
pub fn clear_sparse_tensors(&mut self)
pub fn set_sparse_tensors(&mut self, v: RepeatedField<SparseTensorProto>)
pub fn mut_sparse_tensors(&mut self) -> &mut RepeatedField<SparseTensorProto>
pub fn take_sparse_tensors(&mut self) -> RepeatedField<SparseTensorProto>
pub fn get_type_protos(&self) -> &[TypeProto]
pub fn clear_type_protos(&mut self)
pub fn set_type_protos(&mut self, v: RepeatedField<TypeProto>)
pub fn mut_type_protos(&mut self) -> &mut RepeatedField<TypeProto>
pub fn take_type_protos(&mut self) -> RepeatedField<TypeProto>
Trait Implementations§
Source§impl Clear for AttributeProto
impl Clear for AttributeProto
Source§impl Clone for AttributeProto
impl Clone for AttributeProto
Source§fn clone(&self) -> AttributeProto
fn clone(&self) -> AttributeProto
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AttributeProto
impl Debug for AttributeProto
Source§impl<'a> Default for &'a AttributeProto
impl<'a> Default for &'a AttributeProto
Source§fn default() -> &'a AttributeProto
fn default() -> &'a AttributeProto
Returns the “default value” for a type. Read more
Source§impl Default for AttributeProto
impl Default for AttributeProto
Source§fn default() -> AttributeProto
fn default() -> AttributeProto
Returns the “default value” for a type. Read more
Source§impl From<&str> for AttributeProto
impl From<&str> for AttributeProto
Source§impl From<AttributeProto> for String
impl From<AttributeProto> for String
Source§fn from(value: AttributeProto) -> Self
fn from(value: AttributeProto) -> Self
Converts to this type from the input type.
Source§impl From<AttributeProto> for TensorProto
impl From<AttributeProto> for TensorProto
Source§fn from(value: AttributeProto) -> Self
fn from(value: AttributeProto) -> Self
Converts to this type from the input type.
Source§impl From<AttributeProto> for Vec<f32>
impl From<AttributeProto> for Vec<f32>
Source§fn from(value: AttributeProto) -> Self
fn from(value: AttributeProto) -> Self
Converts to this type from the input type.
Source§impl From<AttributeProto> for Vec<i64>
impl From<AttributeProto> for Vec<i64>
Source§fn from(value: AttributeProto) -> Self
fn from(value: AttributeProto) -> Self
Converts to this type from the input type.
Source§impl From<AttributeProto> for f32
impl From<AttributeProto> for f32
Source§fn from(value: AttributeProto) -> Self
fn from(value: AttributeProto) -> Self
Converts to this type from the input type.
Source§impl From<AttributeProto> for i64
impl From<AttributeProto> for i64
Source§fn from(value: AttributeProto) -> Self
fn from(value: AttributeProto) -> Self
Converts to this type from the input type.
Source§impl From<String> for AttributeProto
impl From<String> for AttributeProto
Source§impl From<TensorProto> for AttributeProto
impl From<TensorProto> for AttributeProto
Source§fn from(value: TensorProto) -> Self
fn from(value: TensorProto) -> Self
Converts to this type from the input type.
Source§impl From<f32> for AttributeProto
impl From<f32> for AttributeProto
Source§impl From<i64> for AttributeProto
impl From<i64> for AttributeProto
Source§impl Message for AttributeProto
impl Message for AttributeProto
Source§fn is_initialized(&self) -> bool
fn is_initialized(&self) -> bool
True iff all required fields are initialized.
Always returns
true for protobuf 3.Source§fn merge_from(&mut self, is: &mut CodedInputStream<'_>) -> ProtobufResult<()>
fn merge_from(&mut self, is: &mut CodedInputStream<'_>) -> ProtobufResult<()>
Update this message object with fields read from given stream.
Source§fn compute_size(&self) -> u32
fn compute_size(&self) -> u32
Compute and cache size of this message and all nested messages
Source§fn write_to_with_cached_sizes(
&self,
os: &mut CodedOutputStream<'_>,
) -> ProtobufResult<()>
fn write_to_with_cached_sizes( &self, os: &mut CodedOutputStream<'_>, ) -> ProtobufResult<()>
Write message to the stream. Read more
Source§fn get_cached_size(&self) -> u32
fn get_cached_size(&self) -> u32
Get size previously computed by
compute_size.Source§fn get_unknown_fields(&self) -> &UnknownFields
fn get_unknown_fields(&self) -> &UnknownFields
Get a reference to unknown fields.
Source§fn mut_unknown_fields(&mut self) -> &mut UnknownFields
fn mut_unknown_fields(&mut self) -> &mut UnknownFields
Get a mutable reference to unknown fields.
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
View self as mutable
Any.Source§fn descriptor(&self) -> &'static MessageDescriptor
fn descriptor(&self) -> &'static MessageDescriptor
Message descriptor for this message, used for reflection.
Source§fn new() -> AttributeProto
fn new() -> AttributeProto
Create an empty message object. Read more
Source§fn default_instance() -> &'static AttributeProto
fn default_instance() -> &'static AttributeProto
Return a pointer to default immutable message with static lifetime. Read more
Source§fn parse_from(is: &mut CodedInputStream<'_>) -> Result<Self, ProtobufError>where
Self: Sized,
fn parse_from(is: &mut CodedInputStream<'_>) -> Result<Self, ProtobufError>where
Self: Sized,
Parse message from stream.
Source§fn write_to(&self, os: &mut CodedOutputStream<'_>) -> Result<(), ProtobufError>
fn write_to(&self, os: &mut CodedOutputStream<'_>) -> Result<(), ProtobufError>
Write the message to the stream. Read more
Source§fn write_length_delimited_to(
&self,
os: &mut CodedOutputStream<'_>,
) -> Result<(), ProtobufError>
fn write_length_delimited_to( &self, os: &mut CodedOutputStream<'_>, ) -> Result<(), ProtobufError>
Write the message to the stream prepending the message with message length
encoded as varint.
Source§fn write_length_delimited_to_vec(
&self,
vec: &mut Vec<u8>,
) -> Result<(), ProtobufError>
fn write_length_delimited_to_vec( &self, vec: &mut Vec<u8>, ) -> Result<(), ProtobufError>
Write the message to the vec, prepend the message with message length
encoded as varint.
Source§fn merge_from_bytes(&mut self, bytes: &[u8]) -> Result<(), ProtobufError>
fn merge_from_bytes(&mut self, bytes: &[u8]) -> Result<(), ProtobufError>
Update this message object with fields read from given stream.
Source§fn parse_from_reader(reader: &mut dyn Read) -> Result<Self, ProtobufError>where
Self: Sized,
fn parse_from_reader(reader: &mut dyn Read) -> Result<Self, ProtobufError>where
Self: Sized,
Parse message from reader.
Parse stops on EOF or when error encountered.
Source§fn parse_from_bytes(bytes: &[u8]) -> Result<Self, ProtobufError>where
Self: Sized,
fn parse_from_bytes(bytes: &[u8]) -> Result<Self, ProtobufError>where
Self: Sized,
Parse message from byte array.
Source§fn parse_from_carllerche_bytes(bytes: &Bytes) -> Result<Self, ProtobufError>where
Self: Sized,
fn parse_from_carllerche_bytes(bytes: &Bytes) -> Result<Self, ProtobufError>where
Self: Sized,
Parse message from
Bytes object.
Resulting message may share references to the passed bytes object.Source§fn check_initialized(&self) -> Result<(), ProtobufError>
fn check_initialized(&self) -> Result<(), ProtobufError>
Check if all required fields of this object are initialized.
Source§fn write_to_writer(&self, w: &mut dyn Write) -> Result<(), ProtobufError>
fn write_to_writer(&self, w: &mut dyn Write) -> Result<(), ProtobufError>
Write the message to the writer.
Source§fn write_to_vec(&self, v: &mut Vec<u8>) -> Result<(), ProtobufError>
fn write_to_vec(&self, v: &mut Vec<u8>) -> Result<(), ProtobufError>
Write the message to bytes vec.
Source§fn write_to_bytes(&self) -> Result<Vec<u8>, ProtobufError>
fn write_to_bytes(&self) -> Result<Vec<u8>, ProtobufError>
Write the message to bytes vec.
Source§fn write_length_delimited_to_writer(
&self,
w: &mut dyn Write,
) -> Result<(), ProtobufError>
fn write_length_delimited_to_writer( &self, w: &mut dyn Write, ) -> Result<(), ProtobufError>
Write the message to the writer, prepend the message with message length
encoded as varint.
Source§fn write_length_delimited_to_bytes(&self) -> Result<Vec<u8>, ProtobufError>
fn write_length_delimited_to_bytes(&self) -> Result<Vec<u8>, ProtobufError>
Write the message to the bytes vec, prepend the message with message length
encoded as varint.
Source§fn descriptor_static() -> &'static MessageDescriptorwhere
Self: Sized,
fn descriptor_static() -> &'static MessageDescriptorwhere
Self: Sized,
Get message descriptor for message type. Read more
Source§impl PartialEq for AttributeProto
impl PartialEq for AttributeProto
Source§impl ProtobufValue for AttributeProto
impl ProtobufValue for AttributeProto
Source§fn as_ref(&self) -> ReflectValueRef<'_>
fn as_ref(&self) -> ReflectValueRef<'_>
As ref
Source§fn is_non_zero(&self) -> bool
fn is_non_zero(&self) -> bool
Is value non-zero?
Source§fn as_ref_copy(&self) -> ReflectValueRef<'static>
fn as_ref_copy(&self) -> ReflectValueRef<'static>
impl StructuralPartialEq for AttributeProto
Auto Trait Implementations§
impl !Freeze for AttributeProto
impl RefUnwindSafe for AttributeProto
impl Send for AttributeProto
impl Sync for AttributeProto
impl Unpin for AttributeProto
impl UnwindSafe for AttributeProto
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more