pub struct Item {Show 18 fields
pub id: Option<i32>,
pub pos: Option<Coord>,
pub flags1: Option<u32>,
pub flags2: Option<u32>,
pub type: Option<MatPair>,
pub material: Option<MatPair>,
pub dye: Option<ColorDefinition>,
pub stack_size: Option<i32>,
pub subpos_x: Option<f32>,
pub subpos_y: Option<f32>,
pub subpos_z: Option<f32>,
pub projectile: Option<bool>,
pub velocity_x: Option<f32>,
pub velocity_y: Option<f32>,
pub velocity_z: Option<f32>,
pub volume: Option<i32>,
pub improvements: Vec<ItemImprovement>,
pub image: Option<ArtImage>,
}Fields§
§id: Option<i32>§pos: Option<Coord>§flags1: Option<u32>§flags2: Option<u32>§type: Option<MatPair>§material: Option<MatPair>§dye: Option<ColorDefinition>§stack_size: Option<i32>§subpos_x: Option<f32>§subpos_y: Option<f32>§subpos_z: Option<f32>§projectile: Option<bool>§velocity_x: Option<f32>§velocity_y: Option<f32>§velocity_z: Option<f32>§volume: Option<i32>§improvements: Vec<ItemImprovement>§image: Option<ArtImage>Implementations§
Source§impl Item
impl Item
Sourcepub fn flags1(&self) -> u32
pub fn flags1(&self) -> u32
Returns the value of flags1, or the default value if flags1 is unset.
Sourcepub fn flags2(&self) -> u32
pub fn flags2(&self) -> u32
Returns the value of flags2, or the default value if flags2 is unset.
Sourcepub fn stack_size(&self) -> i32
pub fn stack_size(&self) -> i32
Returns the value of stack_size, or the default value if stack_size is unset.
Sourcepub fn subpos_x(&self) -> f32
pub fn subpos_x(&self) -> f32
Returns the value of subpos_x, or the default value if subpos_x is unset.
Sourcepub fn subpos_y(&self) -> f32
pub fn subpos_y(&self) -> f32
Returns the value of subpos_y, or the default value if subpos_y is unset.
Sourcepub fn subpos_z(&self) -> f32
pub fn subpos_z(&self) -> f32
Returns the value of subpos_z, or the default value if subpos_z is unset.
Sourcepub fn projectile(&self) -> bool
pub fn projectile(&self) -> bool
Returns the value of projectile, or the default value if projectile is unset.
Sourcepub fn velocity_x(&self) -> f32
pub fn velocity_x(&self) -> f32
Returns the value of velocity_x, or the default value if velocity_x is unset.
Sourcepub fn velocity_y(&self) -> f32
pub fn velocity_y(&self) -> f32
Returns the value of velocity_y, or the default value if velocity_y is unset.
Sourcepub fn velocity_z(&self) -> f32
pub fn velocity_z(&self) -> f32
Returns the value of velocity_z, or the default value if velocity_z is unset.
Trait Implementations§
Source§impl Message for Item
impl Message for Item
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 Item
impl Name for Item
Source§const NAME: &'static str = "Item"
const NAME: &'static str = "Item"
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.impl StructuralPartialEq for Item
Auto Trait Implementations§
impl Freeze for Item
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnsafeUnpin for Item
impl UnwindSafe for Item
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