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: UnknownFieldscached_size: CachedSizeImplementations
sourceimpl 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
sourceimpl Clear for InstrumentDef
impl Clear for InstrumentDef
sourceimpl Clone for InstrumentDef
impl Clone for InstrumentDef
sourcefn clone(&self) -> InstrumentDef
fn clone(&self) -> InstrumentDef
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for InstrumentDef
impl Debug for InstrumentDef
sourceimpl Default for InstrumentDef
impl Default for InstrumentDef
sourcefn default() -> InstrumentDef
fn default() -> InstrumentDef
Returns the “default value” for a type. Read more
sourceimpl<'a> Default for &'a InstrumentDef
impl<'a> Default for &'a InstrumentDef
sourcefn default() -> &'a InstrumentDef
fn default() -> &'a InstrumentDef
Returns the “default value” for a type. Read more
sourceimpl Message for InstrumentDef
impl Message for InstrumentDef
sourcefn is_initialized(&self) -> bool
fn is_initialized(&self) -> bool
True iff all required fields are initialized.
Always returns true for protobuf 3. Read more
sourcefn 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.
sourcefn compute_size(&self) -> u32
fn compute_size(&self) -> u32
Compute and cache size of this message and all nested messages
sourcefn 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
sourcefn get_cached_size(&self) -> u32
fn get_cached_size(&self) -> u32
Get size previously computed by compute_size.
sourcefn get_unknown_fields(&self) -> &UnknownFields
fn get_unknown_fields(&self) -> &UnknownFields
Get a reference to unknown fields.
sourcefn mut_unknown_fields(&mut self) -> &mut UnknownFields
fn mut_unknown_fields(&mut self) -> &mut UnknownFields
Get a mutable reference to unknown fields.
sourcefn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
View self as mutable Any.
sourcefn descriptor(&self) -> &'static MessageDescriptor
fn descriptor(&self) -> &'static MessageDescriptor
Message descriptor for this message, used for reflection.
sourcefn new() -> InstrumentDef
fn new() -> InstrumentDef
Create an empty message object. Read more
sourcefn descriptor_static() -> &'static MessageDescriptor
fn descriptor_static() -> &'static MessageDescriptor
Get message descriptor for message type. Read more
sourcefn default_instance() -> &'static InstrumentDef
fn default_instance() -> &'static InstrumentDef
Return a pointer to default immutable message with static lifetime. Read more
sourcefn parse_from(is: &mut CodedInputStream<'_>) -> Result<Self, ProtobufError>
fn parse_from(is: &mut CodedInputStream<'_>) -> Result<Self, ProtobufError>
Parse message from stream.
sourcefn 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
sourcefn 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. Read more
sourcefn 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. Read more
sourcefn 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.
sourcefn parse_from_reader(reader: &mut dyn Read) -> Result<Self, ProtobufError>
fn parse_from_reader(reader: &mut dyn Read) -> Result<Self, ProtobufError>
Parse message from reader. Parse stops on EOF or when error encountered. Read more
sourcefn parse_from_bytes(bytes: &[u8]) -> Result<Self, ProtobufError>
fn parse_from_bytes(bytes: &[u8]) -> Result<Self, ProtobufError>
Parse message from byte array.
sourcefn check_initialized(&self) -> Result<(), ProtobufError>
fn check_initialized(&self) -> Result<(), ProtobufError>
Check if all required fields of this object are initialized.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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. Read more
sourcefn 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. Read more
sourceimpl PartialEq<InstrumentDef> for InstrumentDef
impl PartialEq<InstrumentDef> for InstrumentDef
sourcefn 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 ==. Read more
sourcefn ne(&self, other: &InstrumentDef) -> bool
fn ne(&self, other: &InstrumentDef) -> bool
This method tests for !=.
sourceimpl ProtobufValue for InstrumentDef
impl ProtobufValue for InstrumentDef
sourcefn as_ref(&self) -> ReflectValueRef<'_>
fn as_ref(&self) -> ReflectValueRef<'_>
As ref
sourcefn is_non_zero(&self) -> bool
fn is_non_zero(&self) -> bool
Is value non-zero?
sourcefn as_ref_copy(&self) -> ReflectValueRef<'static>
fn as_ref_copy(&self) -> ReflectValueRef<'static>
Return ProtobufValueRef if self is Copy. Read more
impl StructuralPartialEq for InstrumentDef
Auto Trait Implementations
impl RefUnwindSafe for InstrumentDef
impl Send for InstrumentDef
impl Sync for InstrumentDef
impl Unpin for InstrumentDef
impl UnwindSafe for InstrumentDef
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more