pub enum ParameterType {
Integer(i32),
String(String),
Color(Color),
Tone(Tone),
AudioFile(AudioFile),
Float(f64),
MoveRoute(MoveRoute),
MoveCommand(MoveCommand),
Array(Vec<ParameterType>),
Bool(bool),
None,
}Variants§
Integer(i32)
String(String)
Color(Color)
Tone(Tone)
AudioFile(AudioFile)
Float(f64)
MoveRoute(MoveRoute)
MoveCommand(MoveCommand)
Array(Vec<ParameterType>)
Bool(bool)
None
Implementations§
Source§impl ParameterType
impl ParameterType
Sourcepub fn into_integer(&mut self) -> &mut i32
pub fn into_integer(&mut self) -> &mut i32
Converts this parameter into a Integer if it is not already, and returns the contained value.
Sourcepub fn into_integer_with(&mut self, default: i32) -> &mut i32
pub fn into_integer_with(&mut self, default: i32) -> &mut i32
Converts this parameter into a Integer if it is not already, replacing it with the provided default.
Sourcepub fn as_integer(&self) -> Option<&i32>
pub fn as_integer(&self) -> Option<&i32>
Gets this parameter as a reference to Integer and returns None if the parameter was not a Integer.
Sourcepub fn as_integer_mut(&mut self) -> Option<&mut i32>
pub fn as_integer_mut(&mut self) -> Option<&mut i32>
Gets this parameter as a mutable reference to Integer and returns None if the parameter was not a Integer.
pub fn is_integer(&self) -> bool
pub fn new_integer(v: i32) -> Self
Source§impl ParameterType
impl ParameterType
Sourcepub fn into_string(&mut self) -> &mut String
pub fn into_string(&mut self) -> &mut String
Converts this parameter into a String if it is not already, and returns the contained value.
Sourcepub fn into_string_with(&mut self, default: String) -> &mut String
pub fn into_string_with(&mut self, default: String) -> &mut String
Converts this parameter into a String if it is not already, replacing it with the provided default.
Sourcepub fn as_string(&self) -> Option<&String>
pub fn as_string(&self) -> Option<&String>
Gets this parameter as a reference to String and returns None if the parameter was not a String.
Sourcepub fn as_string_mut(&mut self) -> Option<&mut String>
pub fn as_string_mut(&mut self) -> Option<&mut String>
Gets this parameter as a mutable reference to String and returns None if the parameter was not a String.
pub fn is_string(&self) -> bool
pub fn new_string(v: String) -> Self
Source§impl ParameterType
impl ParameterType
Sourcepub fn into_color(&mut self) -> &mut Color
pub fn into_color(&mut self) -> &mut Color
Converts this parameter into a Color if it is not already, and returns the contained value.
Sourcepub fn into_color_with(&mut self, default: Color) -> &mut Color
pub fn into_color_with(&mut self, default: Color) -> &mut Color
Converts this parameter into a Color if it is not already, replacing it with the provided default.
Sourcepub fn as_color(&self) -> Option<&Color>
pub fn as_color(&self) -> Option<&Color>
Gets this parameter as a reference to Color and returns None if the parameter was not a Color.
Sourcepub fn as_color_mut(&mut self) -> Option<&mut Color>
pub fn as_color_mut(&mut self) -> Option<&mut Color>
Gets this parameter as a mutable reference to Color and returns None if the parameter was not a Color.
pub fn is_color(&self) -> bool
pub fn new_color(v: Color) -> Self
Source§impl ParameterType
impl ParameterType
Sourcepub fn into_tone(&mut self) -> &mut Tone
pub fn into_tone(&mut self) -> &mut Tone
Converts this parameter into a Tone if it is not already, and returns the contained value.
Sourcepub fn into_tone_with(&mut self, default: Tone) -> &mut Tone
pub fn into_tone_with(&mut self, default: Tone) -> &mut Tone
Converts this parameter into a Tone if it is not already, replacing it with the provided default.
Sourcepub fn as_tone(&self) -> Option<&Tone>
pub fn as_tone(&self) -> Option<&Tone>
Gets this parameter as a reference to Tone and returns None if the parameter was not a Tone.
Sourcepub fn as_tone_mut(&mut self) -> Option<&mut Tone>
pub fn as_tone_mut(&mut self) -> Option<&mut Tone>
Gets this parameter as a mutable reference to Tone and returns None if the parameter was not a Tone.
pub fn is_tone(&self) -> bool
pub fn new_tone(v: Tone) -> Self
Source§impl ParameterType
impl ParameterType
Sourcepub fn into_audiofile(&mut self) -> &mut AudioFile
pub fn into_audiofile(&mut self) -> &mut AudioFile
Converts this parameter into a AudioFile if it is not already, and returns the contained value.
Sourcepub fn into_audiofile_with(&mut self, default: AudioFile) -> &mut AudioFile
pub fn into_audiofile_with(&mut self, default: AudioFile) -> &mut AudioFile
Converts this parameter into a AudioFile if it is not already, replacing it with the provided default.
Sourcepub fn as_audiofile(&self) -> Option<&AudioFile>
pub fn as_audiofile(&self) -> Option<&AudioFile>
Gets this parameter as a reference to AudioFile and returns None if the parameter was not a AudioFile.
Sourcepub fn as_audiofile_mut(&mut self) -> Option<&mut AudioFile>
pub fn as_audiofile_mut(&mut self) -> Option<&mut AudioFile>
Gets this parameter as a mutable reference to AudioFile and returns None if the parameter was not a AudioFile.
pub fn is_audiofile(&self) -> bool
pub fn new_audiofile(v: AudioFile) -> Self
Source§impl ParameterType
impl ParameterType
Sourcepub fn into_float(&mut self) -> &mut f64
pub fn into_float(&mut self) -> &mut f64
Converts this parameter into a Float if it is not already, and returns the contained value.
Sourcepub fn into_float_with(&mut self, default: f64) -> &mut f64
pub fn into_float_with(&mut self, default: f64) -> &mut f64
Converts this parameter into a Float if it is not already, replacing it with the provided default.
Sourcepub fn as_float(&self) -> Option<&f64>
pub fn as_float(&self) -> Option<&f64>
Gets this parameter as a reference to Float and returns None if the parameter was not a Float.
Sourcepub fn as_float_mut(&mut self) -> Option<&mut f64>
pub fn as_float_mut(&mut self) -> Option<&mut f64>
Gets this parameter as a mutable reference to Float and returns None if the parameter was not a Float.
pub fn is_float(&self) -> bool
pub fn new_float(v: f64) -> Self
Source§impl ParameterType
impl ParameterType
Sourcepub fn into_moveroute(&mut self) -> &mut MoveRoute
pub fn into_moveroute(&mut self) -> &mut MoveRoute
Converts this parameter into a MoveRoute if it is not already, and returns the contained value.
Sourcepub fn into_moveroute_with(&mut self, default: MoveRoute) -> &mut MoveRoute
pub fn into_moveroute_with(&mut self, default: MoveRoute) -> &mut MoveRoute
Converts this parameter into a MoveRoute if it is not already, replacing it with the provided default.
Sourcepub fn as_moveroute(&self) -> Option<&MoveRoute>
pub fn as_moveroute(&self) -> Option<&MoveRoute>
Gets this parameter as a reference to MoveRoute and returns None if the parameter was not a MoveRoute.
Sourcepub fn as_moveroute_mut(&mut self) -> Option<&mut MoveRoute>
pub fn as_moveroute_mut(&mut self) -> Option<&mut MoveRoute>
Gets this parameter as a mutable reference to MoveRoute and returns None if the parameter was not a MoveRoute.
pub fn is_moveroute(&self) -> bool
pub fn new_moveroute(v: MoveRoute) -> Self
Source§impl ParameterType
impl ParameterType
Sourcepub fn into_movecommand(&mut self) -> &mut MoveCommand
pub fn into_movecommand(&mut self) -> &mut MoveCommand
Converts this parameter into a MoveCommand if it is not already, and returns the contained value.
Sourcepub fn into_movecommand_with(
&mut self,
default: MoveCommand,
) -> &mut MoveCommand
pub fn into_movecommand_with( &mut self, default: MoveCommand, ) -> &mut MoveCommand
Converts this parameter into a MoveCommand if it is not already, replacing it with the provided default.
Sourcepub fn as_movecommand(&self) -> Option<&MoveCommand>
pub fn as_movecommand(&self) -> Option<&MoveCommand>
Gets this parameter as a reference to MoveCommand and returns None if the parameter was not a MoveCommand.
Sourcepub fn as_movecommand_mut(&mut self) -> Option<&mut MoveCommand>
pub fn as_movecommand_mut(&mut self) -> Option<&mut MoveCommand>
Gets this parameter as a mutable reference to MoveCommand and returns None if the parameter was not a MoveCommand.
pub fn is_movecommand(&self) -> bool
pub fn new_movecommand(v: MoveCommand) -> Self
Source§impl ParameterType
impl ParameterType
Sourcepub fn into_array(&mut self) -> &mut Vec<ParameterType>
pub fn into_array(&mut self) -> &mut Vec<ParameterType>
Converts this parameter into a Array if it is not already, and returns the contained value.
Sourcepub fn into_array_with(
&mut self,
default: Vec<ParameterType>,
) -> &mut Vec<ParameterType>
pub fn into_array_with( &mut self, default: Vec<ParameterType>, ) -> &mut Vec<ParameterType>
Converts this parameter into a Array if it is not already, replacing it with the provided default.
Sourcepub fn as_array(&self) -> Option<&Vec<ParameterType>>
pub fn as_array(&self) -> Option<&Vec<ParameterType>>
Gets this parameter as a reference to Array and returns None if the parameter was not a Array.
Sourcepub fn as_array_mut(&mut self) -> Option<&mut Vec<ParameterType>>
pub fn as_array_mut(&mut self) -> Option<&mut Vec<ParameterType>>
Gets this parameter as a mutable reference to Array and returns None if the parameter was not a Array.
pub fn is_array(&self) -> bool
pub fn new_array(v: Vec<ParameterType>) -> Self
Source§impl ParameterType
impl ParameterType
Sourcepub fn into_bool(&mut self) -> &mut bool
pub fn into_bool(&mut self) -> &mut bool
Converts this parameter into a Bool if it is not already, and returns the contained value.
Sourcepub fn into_bool_with(&mut self, default: bool) -> &mut bool
pub fn into_bool_with(&mut self, default: bool) -> &mut bool
Converts this parameter into a Bool if it is not already, replacing it with the provided default.
Sourcepub fn as_bool(&self) -> Option<&bool>
pub fn as_bool(&self) -> Option<&bool>
Gets this parameter as a reference to Bool and returns None if the parameter was not a Bool.
Sourcepub fn as_bool_mut(&mut self) -> Option<&mut bool>
pub fn as_bool_mut(&mut self) -> Option<&mut bool>
Gets this parameter as a mutable reference to Bool and returns None if the parameter was not a Bool.
pub fn is_bool(&self) -> bool
pub fn new_bool(v: bool) -> Self
Trait Implementations§
Source§impl Clone for ParameterType
impl Clone for ParameterType
Source§fn clone(&self) -> ParameterType
fn clone(&self) -> ParameterType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more