pub enum UIFieldValue<V> {
Show 20 variants
Header,
Label(String),
InputFieldFloat(f32),
InputFieldInteger(i32),
InputFieldString(String),
InputFieldFloat2(f32, f32),
InputFieldInteger2(i32, i32),
InputFieldUnsignedInteger(u32),
ValueSliderFloat(f32),
ValueSliderInteger(i32),
Collapsable(Vec<V>),
Array(Vec<Vec<V>>),
Choice(String),
Checkbox(bool),
Color(u8, u8, u8, u8),
ImageData(String),
ExistingImage(String),
Font(String),
Button,
ImagePreview(String),
}
Expand description
UI Field value, current state of the settings
Variants§
Header
Displays a header for separation reasons
Label(String)
Displays text
InputFieldFloat(f32)
Text field that accepts float values
InputFieldInteger(i32)
Text field that accepts integer values
InputFieldString(String)
Text field that accepts strings
InputFieldFloat2(f32, f32)
Text field that accepts 2 float values
InputFieldInteger2(i32, i32)
Text field that accepts 2 integer values
InputFieldUnsignedInteger(u32)
Text field that accepts only positive integer values
ValueSliderFloat(f32)
Float slider of specified bounds
ValueSliderInteger(i32)
Integer slider of specified bounds
Collapsable(Vec<V>)
Collapsable submenu
Array(Vec<Vec<V>>)
Array of menus
Choice(String)
Choice dropdown
Checkbox(bool)
Checkbox
Color(u8, u8, u8, u8)
Color picker
ImageData(String)
Image data encoded in base64
ExistingImage(String)
Image from image collection
Font(String)
Font name
Button
Button
ImagePreview(String)
Previews an image on UI, png image data encoded in base64
Implementations§
Source§impl<V> UIFieldValue<V>
impl<V> UIFieldValue<V>
Sourcepub fn try_into_bool(&self) -> Result<bool, String>
pub fn try_into_bool(&self) -> Result<bool, String>
Attempts to parse the value into a boolean
Sourcepub fn try_into_f32(&self) -> Result<f32, String>
pub fn try_into_f32(&self) -> Result<f32, String>
Attempts to parse the value into a floating number
Sourcepub fn try_into_i32(&self) -> Result<i32, String>
pub fn try_into_i32(&self) -> Result<i32, String>
Attempts to parse the value into an integer
Sourcepub fn try_into_u32(&self) -> Result<u32, String>
pub fn try_into_u32(&self) -> Result<u32, String>
Attempts to parse the value into an unsigned integer
Sourcepub fn try_into_f32_f32(&self) -> Result<(f32, f32), String>
pub fn try_into_f32_f32(&self) -> Result<(f32, f32), String>
Attempts to parse the value into a pair of floating numbers
Sourcepub fn try_into_i32_i32(&self) -> Result<(i32, i32), String>
pub fn try_into_i32_i32(&self) -> Result<(i32, i32), String>
Attempts to parse the value into a pair of integers
Sourcepub fn try_into_color(&self) -> Result<Color, String>
pub fn try_into_color(&self) -> Result<Color, String>
Attempts to parse the value into a color
Sourcepub fn try_into_string(&self) -> Result<String, String>
pub fn try_into_string(&self) -> Result<String, String>
Attempts to parse the value into a string
Trait Implementations§
Source§impl<V: Clone> Clone for UIFieldValue<V>
impl<V: Clone> Clone for UIFieldValue<V>
Source§fn clone(&self) -> UIFieldValue<V>
fn clone(&self) -> UIFieldValue<V>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<V: Debug> Debug for UIFieldValue<V>
impl<V: Debug> Debug for UIFieldValue<V>
Source§impl<'de, V> Deserialize<'de> for UIFieldValue<V>where
V: Deserialize<'de>,
impl<'de, V> Deserialize<'de> for UIFieldValue<V>where
V: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<UIFieldValue<UIPathValue>> for UIFieldValue<UIValue>
impl From<UIFieldValue<UIPathValue>> for UIFieldValue<UIValue>
Source§fn from(val: UIFieldValue<UIPathValue>) -> Self
fn from(val: UIFieldValue<UIPathValue>) -> Self
Source§impl From<UIFieldValue<UIValue>> for UIFieldValue<UIPathValue>
impl From<UIFieldValue<UIValue>> for UIFieldValue<UIPathValue>
Source§fn from(val: UIFieldValue<UIValue>) -> Self
fn from(val: UIFieldValue<UIValue>) -> Self
Source§impl<V> Into<UIFieldValue<V>> for &Color
impl<V> Into<UIFieldValue<V>> for &Color
Source§fn into(self) -> UIFieldValue<V>
fn into(self) -> UIFieldValue<V>
Source§impl<V> Into<UIFieldValue<V>> for Color
From conversions
impl<V> Into<UIFieldValue<V>> for Color
From conversions
Source§fn into(self) -> UIFieldValue<V>
fn into(self) -> UIFieldValue<V>
Source§impl<V> Serialize for UIFieldValue<V>where
V: Serialize,
impl<V> Serialize for UIFieldValue<V>where
V: Serialize,
Source§impl<V> TryInto<PathBuf> for &UIFieldValue<V>
impl<V> TryInto<PathBuf> for &UIFieldValue<V>
Source§impl<V> TryInto<PathBuf> for UIFieldValue<V>
impl<V> TryInto<PathBuf> for UIFieldValue<V>
Source§impl<V> TryInto<String> for &UIFieldValue<V>
impl<V> TryInto<String> for &UIFieldValue<V>
Source§impl<V> TryInto<String> for UIFieldValue<V>
impl<V> TryInto<String> for UIFieldValue<V>
Source§impl<V> TryInto<bool> for &UIFieldValue<V>
impl<V> TryInto<bool> for &UIFieldValue<V>
Source§impl<V> TryInto<bool> for UIFieldValue<V>
To conversions
impl<V> TryInto<bool> for UIFieldValue<V>
To conversions
Source§impl<V> TryInto<f32> for &UIFieldValue<V>
impl<V> TryInto<f32> for &UIFieldValue<V>
Source§impl<V> TryInto<f32> for UIFieldValue<V>
impl<V> TryInto<f32> for UIFieldValue<V>
Source§impl<V> TryInto<i32> for &UIFieldValue<V>
impl<V> TryInto<i32> for &UIFieldValue<V>
Source§impl<V> TryInto<i32> for UIFieldValue<V>
impl<V> TryInto<i32> for UIFieldValue<V>
Source§impl<V> TryInto<u32> for &UIFieldValue<V>
impl<V> TryInto<u32> for &UIFieldValue<V>
Auto Trait Implementations§
impl<V> Freeze for UIFieldValue<V>
impl<V> RefUnwindSafe for UIFieldValue<V>where
V: RefUnwindSafe,
impl<V> Send for UIFieldValue<V>where
V: Send,
impl<V> Sync for UIFieldValue<V>where
V: Sync,
impl<V> Unpin for UIFieldValue<V>where
V: Unpin,
impl<V> UnwindSafe for UIFieldValue<V>where
V: UnwindSafe,
Blanket Implementations§
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
Source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
Source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
Source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
Source§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
Source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
Source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
Source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
Source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
Source§impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
Source§fn into_color(self) -> U
fn into_color(self) -> U
Source§impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
Source§fn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
Source§fn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
OutOfBounds
error is returned which contains
the unclamped color. Read more