ParameterType

Enum ParameterType 

Source
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

Source

pub fn into_integer(&mut self) -> &mut i32

Converts this parameter into a Integer if it is not already, and returns the contained value.

Source

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.

Source

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.

Source

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.

Source

pub fn is_integer(&self) -> bool

Source

pub fn new_integer(v: i32) -> Self

Source§

impl ParameterType

Source

pub fn into_string(&mut self) -> &mut String

Converts this parameter into a String if it is not already, and returns the contained value.

Source

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.

Source

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.

Source

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.

Source

pub fn is_string(&self) -> bool

Source

pub fn new_string(v: String) -> Self

Source§

impl ParameterType

Source

pub fn into_color(&mut self) -> &mut Color

Converts this parameter into a Color if it is not already, and returns the contained value.

Source

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.

Source

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.

Source

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.

Source

pub fn is_color(&self) -> bool

Source

pub fn new_color(v: Color) -> Self

Source§

impl ParameterType

Source

pub fn into_tone(&mut self) -> &mut Tone

Converts this parameter into a Tone if it is not already, and returns the contained value.

Source

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.

Source

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.

Source

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.

Source

pub fn is_tone(&self) -> bool

Source

pub fn new_tone(v: Tone) -> Self

Source§

impl ParameterType

Source

pub fn into_audiofile(&mut self) -> &mut AudioFile

Converts this parameter into a AudioFile if it is not already, and returns the contained value.

Source

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.

Source

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.

Source

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.

Source

pub fn is_audiofile(&self) -> bool

Source

pub fn new_audiofile(v: AudioFile) -> Self

Source§

impl ParameterType

Source

pub fn into_float(&mut self) -> &mut f64

Converts this parameter into a Float if it is not already, and returns the contained value.

Source

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.

Source

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.

Source

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.

Source

pub fn is_float(&self) -> bool

Source

pub fn new_float(v: f64) -> Self

Source§

impl ParameterType

Source

pub fn into_moveroute(&mut self) -> &mut MoveRoute

Converts this parameter into a MoveRoute if it is not already, and returns the contained value.

Source

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.

Source

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.

Source

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.

Source

pub fn is_moveroute(&self) -> bool

Source

pub fn new_moveroute(v: MoveRoute) -> Self

Source§

impl ParameterType

Source

pub fn into_movecommand(&mut self) -> &mut MoveCommand

Converts this parameter into a MoveCommand if it is not already, and returns the contained value.

Source

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.

Source

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.

Source

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.

Source

pub fn is_movecommand(&self) -> bool

Source

pub fn new_movecommand(v: MoveCommand) -> Self

Source§

impl ParameterType

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn is_array(&self) -> bool

Source

pub fn new_array(v: Vec<ParameterType>) -> Self

Source§

impl ParameterType

Source

pub fn into_bool(&mut self) -> &mut bool

Converts this parameter into a Bool if it is not already, and returns the contained value.

Source

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.

Source

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.

Source

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.

Source

pub fn is_bool(&self) -> bool

Source

pub fn new_bool(v: bool) -> Self

Source§

impl ParameterType

Source

pub fn truthy(&self) -> bool

Source

pub fn falsey(&self) -> bool

Source

pub fn is_none(&self) -> bool

Source

pub fn new_none() -> Self

Trait Implementations§

Source§

impl Clone for ParameterType

Source§

fn clone(&self) -> ParameterType

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ParameterType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ParameterType

Source§

fn default() -> ParameterType

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ParameterType

Source§

fn deserialize<D>(deserializer: D) -> Result<Self, DeError>
where D: DeserializerTrait<'de>,

Deserialize this value from the given deserializer.
Source§

impl<'de> Deserialize<'de> for ParameterType

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<&str> for ParameterType

Source§

fn from(value: &str) -> Self

Converts to this type from the input type.
Source§

impl From<()> for ParameterType

Source§

fn from(_: ()) -> Self

Converts to this type from the input type.
Source§

impl From<AudioFile> for ParameterType

Source§

fn from(v: AudioFile) -> Self

Converts to this type from the input type.
Source§

impl From<Color> for ParameterType

Source§

fn from(v: Color) -> Self

Converts to this type from the input type.
Source§

impl From<MoveCommand> for ParameterType

Source§

fn from(v: MoveCommand) -> Self

Converts to this type from the input type.
Source§

impl From<MoveRoute> for ParameterType

Source§

fn from(v: MoveRoute) -> Self

Converts to this type from the input type.
Source§

impl From<ParameterType> for Value

Source§

fn from(value: ParameterType) -> Self

Converts to this type from the input type.
Source§

impl From<String> for ParameterType

Source§

fn from(v: String) -> Self

Converts to this type from the input type.
Source§

impl From<Tone> for ParameterType

Source§

fn from(v: Tone) -> Self

Converts to this type from the input type.
Source§

impl From<Value> for ParameterType

Source§

fn from(value: Value) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<ParameterType>> for ParameterType

Source§

fn from(v: Vec<ParameterType>) -> Self

Converts to this type from the input type.
Source§

impl From<bool> for ParameterType

Source§

fn from(v: bool) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for ParameterType

Source§

fn from(v: f64) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for ParameterType

Source§

fn from(v: i32) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for ParameterType

Source§

fn eq(&self, other: &ParameterType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for ParameterType

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, SerError>
where S: SerializerTrait,

Serialize this value into the given serializer.
Source§

impl Serialize for ParameterType

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<ParameterType> for AudioFile

Source§

type Error = ParameterType

The type returned in the event of a conversion error.
Source§

fn try_from(v: ParameterType) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ParameterType> for Color

Source§

type Error = ParameterType

The type returned in the event of a conversion error.
Source§

fn try_from(v: ParameterType) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ParameterType> for MoveCommand

Source§

type Error = ParameterType

The type returned in the event of a conversion error.
Source§

fn try_from(v: ParameterType) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ParameterType> for MoveRoute

Source§

type Error = ParameterType

The type returned in the event of a conversion error.
Source§

fn try_from(v: ParameterType) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ParameterType> for String

Source§

type Error = ParameterType

The type returned in the event of a conversion error.
Source§

fn try_from(v: ParameterType) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ParameterType> for Tone

Source§

type Error = ParameterType

The type returned in the event of a conversion error.
Source§

fn try_from(v: ParameterType) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ParameterType> for Vec<ParameterType>

Source§

type Error = ParameterType

The type returned in the event of a conversion error.
Source§

fn try_from(v: ParameterType) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ParameterType> for bool

Source§

type Error = ParameterType

The type returned in the event of a conversion error.
Source§

fn try_from(v: ParameterType) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ParameterType> for f64

Source§

type Error = ParameterType

The type returned in the event of a conversion error.
Source§

fn try_from(v: ParameterType) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ParameterType> for i32

Source§

type Error = ParameterType

The type returned in the event of a conversion error.
Source§

fn try_from(v: ParameterType) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl StructuralPartialEq for ParameterType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,