Enum DataFormat

Source
#[non_exhaustive]
pub enum DataFormat { Text(TextData), Number(NumberData), Switch(SwitchData), Choice(ChoiceData), File(FileData), Folder(FolderData), Color(ColorData), LowerBound(BoundData), UpperBound(BoundData), }

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Text(TextData)

A data type that accepts a string

§

Number(NumberData)

A data type that accepts a number

§

Switch(SwitchData)

A data type that accepts a true or false value

§

Choice(ChoiceData)

A data type that accepts a string where a collection of strings can be chosen from

§

File(FileData)

A data type that represents a file which the user can pick with a file chooser

§

Folder(FolderData)

A data type that represents a folder which the user can pick with a folder chooser

§

Color(ColorData)

A data type that represents a color which the user can pick with a color chooser.

This value must be in a the format #RRGGBBAA.

§

LowerBound(BoundData)

A data type that represents a field for the user to specify the lower bound of the slider range.

The amount of decimals will also specify the precision. For example, if the user sets the lower bound to 1, all values will be whole numbers. If the value is set to 1.0 it will return connector values times 10, if the value is set to 1.00 it will return connector values times 100. The plug-in is responsible of dividing the value to the proper range before it is used. Connectors are only capable of sending integer data.

If UpperBound is also set, both fields will be checked for precision. The higher precision will be used. A range between 1 and 5.0 means it will use the 5.0 for the precision.

Only available for connectors.

Only available in API version 10 and above.

§

UpperBound(BoundData)

A data type that represents a field for the user to specify the upper bound of the slider range.

The amount of decimals will also specify the precision. For example, if the user sets the upper bound to 1, all values of the connector will be send as normal but will be translated to the range specified. If the value is set to 1.0 it will return connector values times 10, if the value is set to 1.00 it will return connector values times 100. The plug-in is responsible of dividing the value to the proper range before it is used. Connectors are only capable of sending integer data.

If LowerBound is also set, both fields will be checked for precision. The higher precision will be used. A range between 1 and 5.0 means it will use the 5.0 for the precision.

Only available for connectors.

Only available in API version 10 and above.

Trait Implementations§

Source§

impl Clone for DataFormat

Source§

fn clone(&self) -> DataFormat

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 DataFormat

Source§

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

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

impl<'de> Deserialize<'de> for DataFormat

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 Serialize for DataFormat

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

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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,