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
Performs the conversion.
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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 Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
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.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more