Struct dfhack_proto::messages::InstrumentDef
source · pub struct InstrumentDef {Show 13 fields
pub flags: SingularPtrField<InstrumentFlags>,
pub pieces: RepeatedField<InstrumentPiece>,
pub sound_production: Vec<SoundProductionType>,
pub sound_production_parm1: RepeatedField<String>,
pub sound_production_parm2: RepeatedField<String>,
pub pitch_choice: Vec<PitchChoiceType>,
pub pitch_choice_parm1: RepeatedField<String>,
pub pitch_choice_parm2: RepeatedField<String>,
pub tuning: Vec<TuningType>,
pub tuning_parm: RepeatedField<String>,
pub registers: RepeatedField<InstrumentRegister>,
pub unknown_fields: UnknownFields,
pub cached_size: CachedSize,
/* private fields */
}Fields§
§flags: SingularPtrField<InstrumentFlags>§pieces: RepeatedField<InstrumentPiece>§sound_production: Vec<SoundProductionType>§sound_production_parm1: RepeatedField<String>§sound_production_parm2: RepeatedField<String>§pitch_choice: Vec<PitchChoiceType>§pitch_choice_parm1: RepeatedField<String>§pitch_choice_parm2: RepeatedField<String>§tuning: Vec<TuningType>§tuning_parm: RepeatedField<String>§registers: RepeatedField<InstrumentRegister>§unknown_fields: UnknownFields§cached_size: CachedSizeImplementations§
source§impl InstrumentDef
impl InstrumentDef
pub fn new() -> InstrumentDef
pub fn get_flags(&self) -> &InstrumentFlags
pub fn clear_flags(&mut self)
pub fn has_flags(&self) -> bool
pub fn set_flags(&mut self, v: InstrumentFlags)
pub fn mut_flags(&mut self) -> &mut InstrumentFlags
pub fn take_flags(&mut self) -> InstrumentFlags
pub fn get_size(&self) -> i32
pub fn clear_size(&mut self)
pub fn has_size(&self) -> bool
pub fn set_size(&mut self, v: i32)
pub fn get_value(&self) -> i32
pub fn clear_value(&mut self)
pub fn has_value(&self) -> bool
pub fn set_value(&mut self, v: i32)
pub fn get_material_size(&self) -> i32
pub fn clear_material_size(&mut self)
pub fn has_material_size(&self) -> bool
pub fn set_material_size(&mut self, v: i32)
pub fn get_pieces(&self) -> &[InstrumentPiece]
pub fn clear_pieces(&mut self)
pub fn set_pieces(&mut self, v: RepeatedField<InstrumentPiece>)
pub fn mut_pieces(&mut self) -> &mut RepeatedField<InstrumentPiece>
pub fn take_pieces(&mut self) -> RepeatedField<InstrumentPiece>
pub fn get_pitch_range_min(&self) -> i32
pub fn clear_pitch_range_min(&mut self)
pub fn has_pitch_range_min(&self) -> bool
pub fn set_pitch_range_min(&mut self, v: i32)
pub fn get_pitch_range_max(&self) -> i32
pub fn clear_pitch_range_max(&mut self)
pub fn has_pitch_range_max(&self) -> bool
pub fn set_pitch_range_max(&mut self, v: i32)
pub fn get_volume_mb_min(&self) -> i32
pub fn clear_volume_mb_min(&mut self)
pub fn has_volume_mb_min(&self) -> bool
pub fn set_volume_mb_min(&mut self, v: i32)
pub fn get_volume_mb_max(&self) -> i32
pub fn clear_volume_mb_max(&mut self)
pub fn has_volume_mb_max(&self) -> bool
pub fn set_volume_mb_max(&mut self, v: i32)
pub fn get_sound_production(&self) -> &[SoundProductionType]
pub fn clear_sound_production(&mut self)
pub fn set_sound_production(&mut self, v: Vec<SoundProductionType>)
pub fn mut_sound_production(&mut self) -> &mut Vec<SoundProductionType>
pub fn take_sound_production(&mut self) -> Vec<SoundProductionType>
pub fn get_sound_production_parm1(&self) -> &[String]
pub fn clear_sound_production_parm1(&mut self)
pub fn set_sound_production_parm1(&mut self, v: RepeatedField<String>)
pub fn mut_sound_production_parm1(&mut self) -> &mut RepeatedField<String>
pub fn take_sound_production_parm1(&mut self) -> RepeatedField<String>
pub fn get_sound_production_parm2(&self) -> &[String]
pub fn clear_sound_production_parm2(&mut self)
pub fn set_sound_production_parm2(&mut self, v: RepeatedField<String>)
pub fn mut_sound_production_parm2(&mut self) -> &mut RepeatedField<String>
pub fn take_sound_production_parm2(&mut self) -> RepeatedField<String>
pub fn get_pitch_choice(&self) -> &[PitchChoiceType]
pub fn clear_pitch_choice(&mut self)
pub fn set_pitch_choice(&mut self, v: Vec<PitchChoiceType>)
pub fn mut_pitch_choice(&mut self) -> &mut Vec<PitchChoiceType>
pub fn take_pitch_choice(&mut self) -> Vec<PitchChoiceType>
pub fn get_pitch_choice_parm1(&self) -> &[String]
pub fn clear_pitch_choice_parm1(&mut self)
pub fn set_pitch_choice_parm1(&mut self, v: RepeatedField<String>)
pub fn mut_pitch_choice_parm1(&mut self) -> &mut RepeatedField<String>
pub fn take_pitch_choice_parm1(&mut self) -> RepeatedField<String>
pub fn get_pitch_choice_parm2(&self) -> &[String]
pub fn clear_pitch_choice_parm2(&mut self)
pub fn set_pitch_choice_parm2(&mut self, v: RepeatedField<String>)
pub fn mut_pitch_choice_parm2(&mut self) -> &mut RepeatedField<String>
pub fn take_pitch_choice_parm2(&mut self) -> RepeatedField<String>
pub fn get_tuning(&self) -> &[TuningType]
pub fn clear_tuning(&mut self)
pub fn set_tuning(&mut self, v: Vec<TuningType>)
pub fn mut_tuning(&mut self) -> &mut Vec<TuningType>
pub fn take_tuning(&mut self) -> Vec<TuningType>
pub fn get_tuning_parm(&self) -> &[String]
pub fn clear_tuning_parm(&mut self)
pub fn set_tuning_parm(&mut self, v: RepeatedField<String>)
pub fn mut_tuning_parm(&mut self) -> &mut RepeatedField<String>
pub fn take_tuning_parm(&mut self) -> RepeatedField<String>
pub fn get_registers(&self) -> &[InstrumentRegister]
pub fn clear_registers(&mut self)
pub fn set_registers(&mut self, v: RepeatedField<InstrumentRegister>)
pub fn mut_registers(&mut self) -> &mut RepeatedField<InstrumentRegister>
pub fn take_registers(&mut self) -> RepeatedField<InstrumentRegister>
pub fn get_description(&self) -> &str
pub fn clear_description(&mut self)
pub fn has_description(&self) -> bool
pub fn set_description(&mut self, v: String)
pub fn mut_description(&mut self) -> &mut String
pub fn take_description(&mut self) -> String
Trait Implementations§
source§impl Clear for InstrumentDef
impl Clear for InstrumentDef
source§impl Clone for InstrumentDef
impl Clone for InstrumentDef
source§fn clone(&self) -> InstrumentDef
fn clone(&self) -> InstrumentDef
Returns a copy 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 InstrumentDef
impl Debug for InstrumentDef
source§impl<'a> Default for &'a InstrumentDef
impl<'a> Default for &'a InstrumentDef
source§fn default() -> &'a InstrumentDef
fn default() -> &'a InstrumentDef
Returns the “default value” for a type. Read more
source§impl Default for InstrumentDef
impl Default for InstrumentDef
source§fn default() -> InstrumentDef
fn default() -> InstrumentDef
Returns the “default value” for a type. Read more
source§impl Message for InstrumentDef
impl Message for InstrumentDef
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() -> InstrumentDef
fn new() -> InstrumentDef
Create an empty message object. Read more
source§fn descriptor_static() -> &'static MessageDescriptor
fn descriptor_static() -> &'static MessageDescriptor
Get message descriptor for message type. Read more
source§fn default_instance() -> &'static InstrumentDef
fn default_instance() -> &'static InstrumentDef
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, Global>
) -> Result<(), ProtobufError>
fn write_length_delimited_to_vec( &self, vec: &mut Vec<u8, Global> ) -> 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 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, Global>) -> Result<(), ProtobufError>
fn write_to_vec(&self, v: &mut Vec<u8, Global>) -> Result<(), ProtobufError>
Write the message to bytes vec.
source§fn write_to_bytes(&self) -> Result<Vec<u8, Global>, ProtobufError>
fn write_to_bytes(&self) -> Result<Vec<u8, Global>, 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, Global>, ProtobufError>
fn write_length_delimited_to_bytes( &self ) -> Result<Vec<u8, Global>, ProtobufError>
Write the message to the bytes vec, prepend the message with message length
encoded as varint.
source§impl PartialEq<InstrumentDef> for InstrumentDef
impl PartialEq<InstrumentDef> for InstrumentDef
source§fn eq(&self, other: &InstrumentDef) -> bool
fn eq(&self, other: &InstrumentDef) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl ProtobufValue for InstrumentDef
impl ProtobufValue for InstrumentDef
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?