pub struct MaterialDefinition {
pub mat_pair: MatPair,
pub id: Option<String>,
pub name: Option<Vec<u8>>,
pub state_color: Option<ColorDefinition>,
pub instrument: Option<InstrumentDef>,
pub up_step: Option<i32>,
pub down_step: Option<i32>,
pub layer: Option<i32>,
}Fields§
§mat_pair: MatPair§id: Option<String>§name: Option<Vec<u8>>§state_color: Option<ColorDefinition>Simplifying colors to assume room temperature.
instrument: Option<InstrumentDef>§up_step: Option<i32>§down_step: Option<i32>§layer: Option<i32>Implementations§
Source§impl MaterialDefinition
impl MaterialDefinition
Sourcepub fn name(&self) -> &[u8] ⓘ
pub fn name(&self) -> &[u8] ⓘ
Returns the value of name, or the default value if name is unset.
Sourcepub fn up_step(&self) -> i32
pub fn up_step(&self) -> i32
Returns the value of up_step, or the default value if up_step is unset.
Sourcepub fn down_step(&self) -> i32
pub fn down_step(&self) -> i32
Returns the value of down_step, or the default value if down_step is unset.
Sourcepub fn layer(&self) -> ArmorLayer
pub fn layer(&self) -> ArmorLayer
Returns the enum value of layer, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_layer(&mut self, value: ArmorLayer)
pub fn set_layer(&mut self, value: ArmorLayer)
Sets layer to the provided enum value.
Trait Implementations§
Source§impl Clone for MaterialDefinition
impl Clone for MaterialDefinition
Source§fn clone(&self) -> MaterialDefinition
fn clone(&self) -> MaterialDefinition
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 MaterialDefinition
impl Debug for MaterialDefinition
Source§impl Default for MaterialDefinition
impl Default for MaterialDefinition
Source§impl Message for MaterialDefinition
impl Message for MaterialDefinition
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl Name for MaterialDefinition
impl Name for MaterialDefinition
Source§const NAME: &'static str = "MaterialDefinition"
const NAME: &'static str = "MaterialDefinition"
Simple name for this
Message.
This name is the same as it appears in the source .proto file, e.g. FooBar.Source§const PACKAGE: &'static str = "RemoteFortressReader"
const PACKAGE: &'static str = "RemoteFortressReader"
Package name this message type is contained in. They are domain-like
and delimited by
., e.g. google.protobuf.Source§fn full_name() -> String
fn full_name() -> String
Fully-qualified unique name for this
Message.
It’s prefixed with the package name and names of any parent messages,
e.g. google.rpc.BadRequest.FieldViolation.
By default, this is the package name followed by the message name.
Fully-qualified names must be unique within a domain of Type URLs.Source§impl PartialEq for MaterialDefinition
impl PartialEq for MaterialDefinition
Source§impl Serialize for MaterialDefinition
impl Serialize for MaterialDefinition
impl StructuralPartialEq for MaterialDefinition
Auto Trait Implementations§
impl Freeze for MaterialDefinition
impl RefUnwindSafe for MaterialDefinition
impl Send for MaterialDefinition
impl Sync for MaterialDefinition
impl Unpin for MaterialDefinition
impl UnsafeUnpin for MaterialDefinition
impl UnwindSafe for MaterialDefinition
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