[−][src]Struct gdnative_core::init::property::hint::RangeHint
Hints that an integer or float property should be within an inclusive range.
Examples
Basic usage:
use gdnative_core::init::property::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
Methods
impl<T> RangeHint<T> where
T: Display,
[src]
T: Display,
pub fn new(min: T, max: T) -> Self
[src]
Creates a new RangeHint
.
pub fn with_step(self, step: T) -> Self
[src]
Builder-style method that returns self
with the given step.
pub fn or_greater(self) -> Self
[src]
Builder-style method that returns self
with the or_greater
hint.
pub fn or_lesser(self) -> Self
[src]
Builder-style method that returns self
with the or_lesser
hint.
pub fn to_godot_hint_string(&self) -> GodotString
[src]
Formats the hint as a Godot hint string.
Trait Implementations
impl<T: Clone> Clone for RangeHint<T>
[src]
impl<T: Copy> Copy for RangeHint<T>
[src]
impl<T: Debug> Debug for RangeHint<T>
[src]
impl<T: Default> Default for RangeHint<T>
[src]
impl<T: Eq> Eq for RangeHint<T>
[src]
impl<T> From<RangeHint<T>> for IntHint<T> where
T: Display,
[src]
T: Display,
impl<T> From<RangeHint<T>> for FloatHint<T> where
T: Display,
[src]
T: Display,
impl<T> From<RangeInclusive<T>> for RangeHint<T> where
T: Display,
[src]
T: Display,
fn from(range: RangeInclusive<T>) -> Self
[src]
impl<T: PartialEq> PartialEq<RangeHint<T>> for RangeHint<T>
[src]
impl<T> StructuralEq for RangeHint<T>
[src]
impl<T> StructuralPartialEq for RangeHint<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for RangeHint<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for RangeHint<T> where
T: Send,
T: Send,
impl<T> Sync for RangeHint<T> where
T: Sync,
T: Sync,
impl<T> Unpin for RangeHint<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for RangeHint<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,