pub struct RangeHint<T> {
pub min: T,
pub max: T,
pub step: Option<T>,
pub or_greater: bool,
pub or_lesser: bool,
}
Expand description
Hints that an integer or float property should be within an inclusive range.
§Examples
Basic usage:
use gdnative_core::export::hint::RangeHint;
let hint: RangeHint<f64> = RangeHint::new(0.0, 20.0).or_greater();
Fields§
§min: T
Minimal value, inclusive
max: T
Maximal value, inclusive
step: Option<T>
Optional step value for the slider
or_greater: bool
Allow manual input above the max
value
or_lesser: bool
Allow manual input below the min
value
Implementations§
Trait Implementations§
Source§impl<T> From<RangeInclusive<T>> for RangeHint<T>where
T: Display,
impl<T> From<RangeInclusive<T>> for RangeHint<T>where
T: Display,
Source§fn from(range: RangeInclusive<T>) -> Self
fn from(range: RangeInclusive<T>) -> Self
Converts to this type from the input type.
impl<T: Copy> Copy for RangeHint<T>
impl<T: Eq> Eq for RangeHint<T>
impl<T> StructuralPartialEq for RangeHint<T>
Auto Trait Implementations§
impl<T> Freeze for RangeHint<T>where
T: Freeze,
impl<T> RefUnwindSafe for RangeHint<T>where
T: RefUnwindSafe,
impl<T> Send for RangeHint<T>where
T: Send,
impl<T> Sync for RangeHint<T>where
T: Sync,
impl<T> Unpin for RangeHint<T>where
T: Unpin,
impl<T> UnwindSafe for RangeHint<T>where
T: UnwindSafe,
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.