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
sourceimpl<T> From<RangeInclusive<T>> for RangeHint<T>where
T: Display,
impl<T> From<RangeInclusive<T>> for RangeHint<T>where
T: Display,
sourcefn from(range: RangeInclusive<T>) -> Self
fn from(range: RangeInclusive<T>) -> Self
Converts to this type from the input type.
sourceimpl<T: PartialEq> PartialEq<RangeHint<T>> for RangeHint<T>
impl<T: PartialEq> PartialEq<RangeHint<T>> for RangeHint<T>
impl<T: Copy> Copy for RangeHint<T>
impl<T: Eq> Eq for RangeHint<T>
impl<T> StructuralEq for RangeHint<T>
impl<T> StructuralPartialEq for RangeHint<T>
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.