Rl

Struct Rl 

Source
pub struct Rl<T>(pub T);
Expand description

Relative - Represents scalable unit 0% to 100%. 120% is allowed.

ยง๐Ÿ› ๏ธ Example

let a: Rl<f32> = Rl(25.0) + Rl(40.0); // -> 65%
let b: Rl<f32> = Rl(25.0) * 3.0;      // -> 75%

Tuple Fieldsยง

ยง0: T

Trait Implementationsยง

Sourceยง

impl<T: Add<Output = T>> Add<Ab<T>> for Rl<T>

Sourceยง

type Output = UiValue<T>

The resulting type after applying the + operator.
Sourceยง

fn add(self, other: Ab<T>) -> Self::Output

Performs the + operation. Read more
Sourceยง

impl<T: Add<Output = T>> Add<Em<T>> for Rl<T>

Sourceยง

type Output = UiValue<T>

The resulting type after applying the + operator.
Sourceยง

fn add(self, other: Em<T>) -> Self::Output

Performs the + operation. Read more
Sourceยง

impl<T: Add<Output = T>> Add<Rh<T>> for Rl<T>

Sourceยง

type Output = UiValue<T>

The resulting type after applying the + operator.
Sourceยง

fn add(self, other: Rh<T>) -> Self::Output

Performs the + operation. Read more
Sourceยง

impl<T: Add<Output = T>> Add<Rl<T>> for Ab<T>

Sourceยง

type Output = UiValue<T>

The resulting type after applying the + operator.
Sourceยง

fn add(self, other: Rl<T>) -> Self::Output

Performs the + operation. Read more
Sourceยง

impl<T: Add<Output = T>> Add<Rl<T>> for Em<T>

Sourceยง

type Output = UiValue<T>

The resulting type after applying the + operator.
Sourceยง

fn add(self, other: Rl<T>) -> Self::Output

Performs the + operation. Read more
Sourceยง

impl<T: Add<Output = T>> Add<Rl<T>> for Rh<T>

Sourceยง

type Output = UiValue<T>

The resulting type after applying the + operator.
Sourceยง

fn add(self, other: Rl<T>) -> Self::Output

Performs the + operation. Read more
Sourceยง

impl<T: Add<Output = T>> Add<Rl<T>> for Rw<T>

Sourceยง

type Output = UiValue<T>

The resulting type after applying the + operator.
Sourceยง

fn add(self, other: Rl<T>) -> Self::Output

Performs the + operation. Read more
Sourceยง

impl<T: Add<Output = T> + Add> Add<Rl<T>> for UiValue<T>

Sourceยง

type Output = UiValue<T>

The resulting type after applying the + operator.
Sourceยง

fn add(self, other: Rl<T>) -> Self::Output

Performs the + operation. Read more
Sourceยง

impl<T: Add<Output = T>> Add<Rl<T>> for Vh<T>

Sourceยง

type Output = UiValue<T>

The resulting type after applying the + operator.
Sourceยง

fn add(self, other: Rl<T>) -> Self::Output

Performs the + operation. Read more
Sourceยง

impl<T: Add<Output = T>> Add<Rl<T>> for Vp<T>

Sourceยง

type Output = UiValue<T>

The resulting type after applying the + operator.
Sourceยง

fn add(self, other: Rl<T>) -> Self::Output

Performs the + operation. Read more
Sourceยง

impl<T: Add<Output = T>> Add<Rl<T>> for Vw<T>

Sourceยง

type Output = UiValue<T>

The resulting type after applying the + operator.
Sourceยง

fn add(self, other: Rl<T>) -> Self::Output

Performs the + operation. Read more
Sourceยง

impl<T: Add<Output = T>> Add<Rw<T>> for Rl<T>

Sourceยง

type Output = UiValue<T>

The resulting type after applying the + operator.
Sourceยง

fn add(self, other: Rw<T>) -> Self::Output

Performs the + operation. Read more
Sourceยง

impl<T: Add<Output = T>> Add<Vh<T>> for Rl<T>

Sourceยง

type Output = UiValue<T>

The resulting type after applying the + operator.
Sourceยง

fn add(self, other: Vh<T>) -> Self::Output

Performs the + operation. Read more
Sourceยง

impl<T: Add<Output = T>> Add<Vp<T>> for Rl<T>

Sourceยง

type Output = UiValue<T>

The resulting type after applying the + operator.
Sourceยง

fn add(self, other: Vp<T>) -> Self::Output

Performs the + operation. Read more
Sourceยง

impl<T: Add<Output = T>> Add<Vw<T>> for Rl<T>

Sourceยง

type Output = UiValue<T>

The resulting type after applying the + operator.
Sourceยง

fn add(self, other: Vw<T>) -> Self::Output

Performs the + operation. Read more
Sourceยง

impl<T: Add<Output = T>> Add for Rl<T>

Sourceยง

type Output = Rl<T>

The resulting type after applying the + operator.
Sourceยง

fn add(self, other: Self) -> Self::Output

Performs the + operation. Read more
Sourceยง

impl<T: Add<Output = T> + Copy> AddAssign<Rl<T>> for UiValue<T>

Sourceยง

fn add_assign(&mut self, rhs: Rl<T>)

Performs the += operation. Read more
Sourceยง

impl<T: AddAssign<T>> AddAssign for Rl<T>

Sourceยง

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Sourceยง

impl<T: Clone> Clone for Rl<T>

Sourceยง

fn clone(&self) -> Rl<T>

Returns a duplicate of the value. Read more
1.0.0 ยท Sourceยง

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Sourceยง

impl<T: Debug> Debug for Rl<T>

Sourceยง

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Sourceยง

impl<T: Default> Default for Rl<T>

Sourceยง

fn default() -> Rl<T>

Returns the โ€œdefault valueโ€ for a type. Read more
Sourceยง

impl<T> Deref for Rl<T>

Sourceยง

type Target = T

The resulting type after dereferencing.
Sourceยง

fn deref(&self) -> &Self::Target

Dereferences the value.
Sourceยง

impl<T> DerefMut for Rl<T>

Sourceยง

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Sourceยง

impl From<Rl<(f32, f32)>> for UiValue<Vec2>

Sourceยง

fn from(val: Rl<(f32, f32)>) -> UiValue<Vec2>

Converts to this type from the input type.
Sourceยง

impl From<Rl<(f32, f32, f32)>> for UiValue<Vec3>

Sourceยง

fn from(val: Rl<(f32, f32, f32)>) -> UiValue<Vec3>

Converts to this type from the input type.
Sourceยง

impl From<Rl<(f32, f32, f32, f32)>> for UiValue<Vec4>

Sourceยง

fn from(val: Rl<(f32, f32, f32, f32)>) -> UiValue<Vec4>

Converts to this type from the input type.
Sourceยง

impl<T> From<Rl<T>> for UiValue<T>

Sourceยง

fn from(val: Rl<T>) -> UiValue<T>

Converts to this type from the input type.
Sourceยง

impl From<Rl<f32>> for UiValue<Vec2>

Sourceยง

fn from(val: Rl<f32>) -> UiValue<Vec2>

Converts to this type from the input type.
Sourceยง

impl From<Rl<f32>> for UiValue<Vec3>

Sourceยง

fn from(val: Rl<f32>) -> UiValue<Vec3>

Converts to this type from the input type.
Sourceยง

impl From<Rl<f32>> for UiValue<Vec4>

Sourceยง

fn from(val: Rl<f32>) -> UiValue<Vec4>

Converts to this type from the input type.
Sourceยง

impl<T> FromArg for Rl<T>
where Rl<T>: Any + Send + Sync, T: TypePath + FromReflect + MaybeTyped + RegisterForReflection,

Sourceยง

type This<'from_arg> = Rl<T>

The type to convert into. Read more
Sourceยง

fn from_arg(arg: Arg<'_>) -> Result<Self::This<'_>, ArgError>

Creates an item from an argument. Read more
Sourceยง

impl<T> FromReflect for Rl<T>
where Rl<T>: Any + Send + Sync, T: TypePath + FromReflect + MaybeTyped + RegisterForReflection,

Sourceยง

fn from_reflect(reflect: &dyn PartialReflect) -> Option<Self>

Constructs a concrete instance of Self from a reflected value.
Sourceยง

fn take_from_reflect( reflect: Box<dyn PartialReflect>, ) -> Result<Self, Box<dyn PartialReflect>>

Attempts to downcast the given value to Self using, constructing the value using from_reflect if that fails. Read more
Sourceยง

impl<T> GetOwnership for Rl<T>
where Rl<T>: Any + Send + Sync, T: TypePath + FromReflect + MaybeTyped + RegisterForReflection,

Sourceยง

fn ownership() -> Ownership

Returns the ownership of Self.
Sourceยง

impl<T> GetTypeRegistration for Rl<T>
where Rl<T>: Any + Send + Sync, T: TypePath + FromReflect + MaybeTyped + RegisterForReflection,

Sourceยง

fn get_type_registration() -> TypeRegistration

Returns the default TypeRegistration for this type.
Sourceยง

fn register_type_dependencies(registry: &mut TypeRegistry)

Registers other types needed by this type. Read more
Sourceยง

impl<T> IntoReturn for Rl<T>
where Rl<T>: Any + Send + Sync, T: TypePath + FromReflect + MaybeTyped + RegisterForReflection,

Sourceยง

fn into_return<'into_return>(self) -> Return<'into_return>
where Self: 'into_return,

Converts Self into a Return value.
Sourceยง

impl<T: Mul<Output = T> + Mul> Mul<Rl<T>> for UiValue<T>

Sourceยง

type Output = UiValue<T>

The resulting type after applying the * operator.
Sourceยง

fn mul(self, other: Rl<T>) -> Self::Output

Performs the * operation. Read more
Sourceยง

impl<T: Mul<f32, Output = T>> Mul<f32> for Rl<T>

Sourceยง

type Output = Rl<T>

The resulting type after applying the * operator.
Sourceยง

fn mul(self, rhs: f32) -> Self::Output

Performs the * operation. Read more
Sourceยง

impl<T: Mul<Output = T>> Mul for Rl<T>

Sourceยง

type Output = Rl<T>

The resulting type after applying the * operator.
Sourceยง

fn mul(self, other: Self) -> Self::Output

Performs the * operation. Read more
Sourceยง

impl<T: Mul<Output = T> + Copy> MulAssign<Rl<T>> for UiValue<T>

Sourceยง

fn mul_assign(&mut self, rhs: Rl<T>)

Performs the *= operation. Read more
Sourceยง

impl<T: MulAssign<f32>> MulAssign<f32> for Rl<T>

Sourceยง

fn mul_assign(&mut self, rhs: f32)

Performs the *= operation. Read more
Sourceยง

impl<T: MulAssign<T>> MulAssign for Rl<T>

Sourceยง

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
Sourceยง

impl<T: Neg<Output = T>> Neg for Rl<T>

Sourceยง

type Output = Rl<T>

The resulting type after applying the - operator.
Sourceยง

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Sourceยง

impl<T: PartialEq> PartialEq for Rl<T>

Sourceยง

fn eq(&self, other: &Rl<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 ยท Sourceยง

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Sourceยง

impl<T> PartialReflect for Rl<T>
where Rl<T>: Any + Send + Sync, T: TypePath + FromReflect + MaybeTyped + RegisterForReflection,

Sourceยง

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Returns the TypeInfo of the type represented by this value. Read more
Sourceยง

fn try_apply(&mut self, value: &dyn PartialReflect) -> Result<(), ApplyError>

Tries to apply a reflected value to this value. Read more
Sourceยง

fn reflect_kind(&self) -> ReflectKind

Returns a zero-sized enumeration of โ€œkindsโ€ of type. Read more
Sourceยง

fn reflect_ref(&self) -> ReflectRef<'_>

Returns an immutable enumeration of โ€œkindsโ€ of type. Read more
Sourceยง

fn reflect_mut(&mut self) -> ReflectMut<'_>

Returns a mutable enumeration of โ€œkindsโ€ of type. Read more
Sourceยง

fn reflect_owned(self: Box<Self>) -> ReflectOwned

Returns an owned enumeration of โ€œkindsโ€ of type. Read more
Sourceยง

fn try_into_reflect( self: Box<Self>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Attempts to cast this type to a boxed, fully-reflected value.
Sourceยง

fn try_as_reflect(&self) -> Option<&dyn Reflect>

Attempts to cast this type to a fully-reflected value.
Sourceยง

fn try_as_reflect_mut(&mut self) -> Option<&mut dyn Reflect>

Attempts to cast this type to a mutable, fully-reflected value.
Sourceยง

fn into_partial_reflect(self: Box<Self>) -> Box<dyn PartialReflect>

Casts this type to a boxed, reflected value. Read more
Sourceยง

fn as_partial_reflect(&self) -> &dyn PartialReflect

Casts this type to a reflected value. Read more
Sourceยง

fn as_partial_reflect_mut(&mut self) -> &mut dyn PartialReflect

Casts this type to a mutable, reflected value. Read more
Sourceยง

fn reflect_partial_eq(&self, value: &dyn PartialReflect) -> Option<bool>

Returns a โ€œpartial equalityโ€ comparison result. Read more
Sourceยง

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Attempts to clone Self using reflection. Read more
Sourceยง

fn apply(&mut self, value: &(dyn PartialReflect + 'static))

Applies a reflected value to this value. Read more
Sourceยง

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Converts this reflected value into its dynamic representation based on its kind. Read more
Sourceยง

fn reflect_clone_and_take<T>(&self) -> Result<T, ReflectCloneError>
where T: 'static, Self: Sized + TypePath,

For a type implementing PartialReflect, combines reflect_clone and take in a useful fashion, automatically constructing an appropriate ReflectCloneError if the downcast fails. Read more
Sourceยง

fn reflect_hash(&self) -> Option<u64>

Returns a hash of the value (which includes the type). Read more
Sourceยง

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Debug formatter for the value. Read more
Sourceยง

fn is_dynamic(&self) -> bool

Indicates whether or not this type is a dynamic type. Read more
Sourceยง

impl<T> Reflect for Rl<T>
where Rl<T>: Any + Send + Sync, T: TypePath + FromReflect + MaybeTyped + RegisterForReflection,

Sourceยง

fn into_any(self: Box<Self>) -> Box<dyn Any>

Returns the value as a Box<dyn Any>. Read more
Sourceยง

fn as_any(&self) -> &dyn Any

Returns the value as a &dyn Any. Read more
Sourceยง

fn as_any_mut(&mut self) -> &mut dyn Any

Returns the value as a &mut dyn Any. Read more
Sourceยง

fn into_reflect(self: Box<Self>) -> Box<dyn Reflect>

Casts this type to a boxed, fully-reflected value.
Sourceยง

fn as_reflect(&self) -> &dyn Reflect

Casts this type to a fully-reflected value.
Sourceยง

fn as_reflect_mut(&mut self) -> &mut dyn Reflect

Casts this type to a mutable, fully-reflected value.
Sourceยง

fn set(&mut self, value: Box<dyn Reflect>) -> Result<(), Box<dyn Reflect>>

Performs a type-checked assignment of a reflected value to this value. Read more
Sourceยง

impl<T> Sub<Ab<T>> for Rl<T>
where T: Neg<Output = T> + Sub<Output = T>,

Sourceยง

type Output = UiValue<T>

The resulting type after applying the - operator.
Sourceยง

fn sub(self, other: Ab<T>) -> Self::Output

Performs the - operation. Read more
Sourceยง

impl<T> Sub<Em<T>> for Rl<T>
where T: Neg<Output = T> + Sub<Output = T>,

Sourceยง

type Output = UiValue<T>

The resulting type after applying the - operator.
Sourceยง

fn sub(self, other: Em<T>) -> Self::Output

Performs the - operation. Read more
Sourceยง

impl<T> Sub<Rh<T>> for Rl<T>
where T: Neg<Output = T> + Sub<Output = T>,

Sourceยง

type Output = UiValue<T>

The resulting type after applying the - operator.
Sourceยง

fn sub(self, other: Rh<T>) -> Self::Output

Performs the - operation. Read more
Sourceยง

impl<T> Sub<Rl<T>> for Ab<T>
where T: Neg<Output = T> + Sub<Output = T>,

Sourceยง

type Output = UiValue<T>

The resulting type after applying the - operator.
Sourceยง

fn sub(self, other: Rl<T>) -> Self::Output

Performs the - operation. Read more
Sourceยง

impl<T> Sub<Rl<T>> for Em<T>
where T: Neg<Output = T> + Sub<Output = T>,

Sourceยง

type Output = UiValue<T>

The resulting type after applying the - operator.
Sourceยง

fn sub(self, other: Rl<T>) -> Self::Output

Performs the - operation. Read more
Sourceยง

impl<T> Sub<Rl<T>> for Rh<T>
where T: Neg<Output = T> + Sub<Output = T>,

Sourceยง

type Output = UiValue<T>

The resulting type after applying the - operator.
Sourceยง

fn sub(self, other: Rl<T>) -> Self::Output

Performs the - operation. Read more
Sourceยง

impl<T> Sub<Rl<T>> for Rw<T>
where T: Neg<Output = T> + Sub<Output = T>,

Sourceยง

type Output = UiValue<T>

The resulting type after applying the - operator.
Sourceยง

fn sub(self, other: Rl<T>) -> Self::Output

Performs the - operation. Read more
Sourceยง

impl<T: Sub<Output = T> + Sub> Sub<Rl<T>> for UiValue<T>

Sourceยง

type Output = UiValue<T>

The resulting type after applying the - operator.
Sourceยง

fn sub(self, other: Rl<T>) -> Self::Output

Performs the - operation. Read more
Sourceยง

impl<T> Sub<Rl<T>> for Vh<T>
where T: Neg<Output = T> + Sub<Output = T>,

Sourceยง

type Output = UiValue<T>

The resulting type after applying the - operator.
Sourceยง

fn sub(self, other: Rl<T>) -> Self::Output

Performs the - operation. Read more
Sourceยง

impl<T> Sub<Rl<T>> for Vp<T>
where T: Neg<Output = T> + Sub<Output = T>,

Sourceยง

type Output = UiValue<T>

The resulting type after applying the - operator.
Sourceยง

fn sub(self, other: Rl<T>) -> Self::Output

Performs the - operation. Read more
Sourceยง

impl<T> Sub<Rl<T>> for Vw<T>
where T: Neg<Output = T> + Sub<Output = T>,

Sourceยง

type Output = UiValue<T>

The resulting type after applying the - operator.
Sourceยง

fn sub(self, other: Rl<T>) -> Self::Output

Performs the - operation. Read more
Sourceยง

impl<T> Sub<Rw<T>> for Rl<T>
where T: Neg<Output = T> + Sub<Output = T>,

Sourceยง

type Output = UiValue<T>

The resulting type after applying the - operator.
Sourceยง

fn sub(self, other: Rw<T>) -> Self::Output

Performs the - operation. Read more
Sourceยง

impl<T> Sub<Vh<T>> for Rl<T>
where T: Neg<Output = T> + Sub<Output = T>,

Sourceยง

type Output = UiValue<T>

The resulting type after applying the - operator.
Sourceยง

fn sub(self, other: Vh<T>) -> Self::Output

Performs the - operation. Read more
Sourceยง

impl<T> Sub<Vp<T>> for Rl<T>
where T: Neg<Output = T> + Sub<Output = T>,

Sourceยง

type Output = UiValue<T>

The resulting type after applying the - operator.
Sourceยง

fn sub(self, other: Vp<T>) -> Self::Output

Performs the - operation. Read more
Sourceยง

impl<T> Sub<Vw<T>> for Rl<T>
where T: Neg<Output = T> + Sub<Output = T>,

Sourceยง

type Output = UiValue<T>

The resulting type after applying the - operator.
Sourceยง

fn sub(self, other: Vw<T>) -> Self::Output

Performs the - operation. Read more
Sourceยง

impl<T: Sub<Output = T>> Sub for Rl<T>

Sourceยง

type Output = Rl<T>

The resulting type after applying the - operator.
Sourceยง

fn sub(self, other: Self) -> Self::Output

Performs the - operation. Read more
Sourceยง

impl<T: Sub<Output = T> + Copy> SubAssign<Rl<T>> for UiValue<T>

Sourceยง

fn sub_assign(&mut self, rhs: Rl<T>)

Performs the -= operation. Read more
Sourceยง

impl<T: SubAssign<T>> SubAssign for Rl<T>

Sourceยง

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Sourceยง

impl<T> TupleStruct for Rl<T>
where Rl<T>: Any + Send + Sync, T: TypePath + FromReflect + MaybeTyped + RegisterForReflection,

Sourceยง

fn field(&self, index: usize) -> Option<&dyn PartialReflect>

Returns a reference to the value of the field with index index as a &dyn Reflect.
Sourceยง

fn field_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Returns a mutable reference to the value of the field with index index as a &mut dyn Reflect.
Sourceยง

fn field_len(&self) -> usize

Returns the number of fields in the tuple struct.
Sourceยง

fn iter_fields(&self) -> TupleStructFieldIter<'_>

Returns an iterator over the values of the tuple structโ€™s fields.
Sourceยง

fn to_dynamic_tuple_struct(&self) -> DynamicTupleStruct

Creates a new DynamicTupleStruct from this tuple struct.
Sourceยง

fn get_represented_tuple_struct_info(&self) -> Option<&'static TupleStructInfo>

Will return None if TypeInfo is not available.
Sourceยง

impl<T> TypePath for Rl<T>
where Rl<T>: Any + Send + Sync, T: TypePath,

Sourceยง

fn type_path() -> &'static str

Returns the fully qualified path of the underlying type. Read more
Sourceยง

fn short_type_path() -> &'static str

Returns a short, pretty-print enabled path to the type. Read more
Sourceยง

fn type_ident() -> Option<&'static str>

Returns the name of the type, or None if it is anonymous. Read more
Sourceยง

fn crate_name() -> Option<&'static str>

Returns the name of the crate the type is in, or None if it is anonymous. Read more
Sourceยง

fn module_path() -> Option<&'static str>

Returns the path to the module the type is in, or None if it is anonymous. Read more
Sourceยง

impl<T> Typed for Rl<T>
where Rl<T>: Any + Send + Sync, T: TypePath + FromReflect + MaybeTyped + RegisterForReflection,

Sourceยง

fn type_info() -> &'static TypeInfo

Returns the compile-time info for the underlying type.
Sourceยง

impl<T: Copy> Copy for Rl<T>

Sourceยง

impl<T> StructuralPartialEq for Rl<T>

Auto Trait Implementationsยง

ยง

impl<T> Freeze for Rl<T>
where T: Freeze,

ยง

impl<T> RefUnwindSafe for Rl<T>
where T: RefUnwindSafe,

ยง

impl<T> Send for Rl<T>
where T: Send,

ยง

impl<T> Sync for Rl<T>
where T: Sync,

ยง

impl<T> Unpin for Rl<T>
where T: Unpin,

ยง

impl<T> UnwindSafe for Rl<T>
where T: UnwindSafe,

Blanket Implementationsยง

Sourceยง

impl<T> Any for T
where T: 'static + ?Sized,

Sourceยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Sourceยง

impl<T, U> AsBindGroupShaderType<U> for T
where U: ShaderType, &'a T: for<'a> Into<U>,

Sourceยง

fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U

Return the T ShaderType for self. When used in AsBindGroup derives, it is safe to assume that all images in self exist.
Sourceยง

impl<T> Borrow<T> for T
where T: ?Sized,

Sourceยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Sourceยง

impl<T> BorrowMut<T> for T
where T: ?Sized,

Sourceยง

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Sourceยง

impl<T> CloneToUninit for T
where T: Clone,

Sourceยง

unsafe fn clone_to_uninit(&self, dest: *mut u8)

๐Ÿ”ฌThis is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Sourceยง

impl<T, C, D> Curve<T> for D
where C: Curve<T> + ?Sized, D: Deref<Target = C>,

Sourceยง

fn domain(&self) -> Interval

The interval over which this curve is parametrized. Read more
Sourceยง

fn sample_unchecked(&self, t: f32) -> T

Sample a point on this curve at the parameter value t, extracting the associated value. This is the unchecked version of sampling, which should only be used if the sample time t is already known to lie within the curveโ€™s domain. Read more
Sourceยง

fn sample(&self, t: f32) -> Option<T>

Sample a point on this curve at the parameter value t, returning None if the point is outside of the curveโ€™s domain.
Sourceยง

fn sample_clamped(&self, t: f32) -> T

Sample a point on this curve at the parameter value t, clamping t to lie inside the domain of the curve.
Sourceยง

impl<C, T> CurveExt<T> for C
where C: Curve<T>,

Sourceยง

fn sample_iter( &self, iter: impl IntoIterator<Item = f32>, ) -> impl Iterator<Item = Option<T>>

Sample a collection of n >= 0 points on this curve at the parameter values t_n, returning None if the point is outside of the curveโ€™s domain. Read more
Sourceยง

fn sample_iter_unchecked( &self, iter: impl IntoIterator<Item = f32>, ) -> impl Iterator<Item = T>

Sample a collection of n >= 0 points on this curve at the parameter values t_n, extracting the associated values. This is the unchecked version of sampling, which should only be used if the sample times t_n are already known to lie within the curveโ€™s domain. Read more
Sourceยง

fn sample_iter_clamped( &self, iter: impl IntoIterator<Item = f32>, ) -> impl Iterator<Item = T>

Sample a collection of n >= 0 points on this curve at the parameter values t_n, clamping t_n to lie inside the domain of the curve. Read more
Sourceยง

fn map<S, F>(self, f: F) -> MapCurve<T, S, Self, F>
where F: Fn(T) -> S,

Create a new curve by mapping the values of this curve via a function f; i.e., if the sample at time t for this curve is x, the value at time t on the new curve will be f(x).
Sourceยง

fn reparametrize<F>(self, domain: Interval, f: F) -> ReparamCurve<T, Self, F>
where F: Fn(f32) -> f32,

Create a new Curve whose parameter space is related to the parameter space of this curve by f. For each time t, the sample from the new curve at time t is the sample from this curve at time f(t). The given domain will be the domain of the new curve. The function f is expected to take domain into self.domain(). Read more
Sourceยง

fn reparametrize_linear( self, domain: Interval, ) -> Result<LinearReparamCurve<T, Self>, LinearReparamError>

Linearly reparametrize this Curve, producing a new curve whose domain is the given domain instead of the current one. This operation is only valid for curves with bounded domains. Read more
Sourceยง

fn reparametrize_by_curve<C>(self, other: C) -> CurveReparamCurve<T, Self, C>
where C: Curve<f32>,

Reparametrize this Curve by sampling from another curve. Read more
Sourceยง

fn graph(self) -> GraphCurve<T, Self>

Create a new Curve which is the graph of this one; that is, its output echoes the sample time as part of a tuple. Read more
Sourceยง

fn zip<S, C>( self, other: C, ) -> Result<ZipCurve<T, S, Self, C>, InvalidIntervalError>
where C: Curve<S>,

Create a new Curve by zipping this curve together with another. Read more
Sourceยง

fn chain<C>(self, other: C) -> Result<ChainCurve<T, Self, C>, ChainError>
where C: Curve<T>,

Create a new Curve by composing this curve end-to-start with another, producing another curve with outputs of the same type. The domain of the other curve is translated so that its start coincides with where this curve ends. Read more
Sourceยง

fn reverse(self) -> Result<ReverseCurve<T, Self>, ReverseError>

Create a new Curve inverting this curve on the x-axis, producing another curve with outputs of the same type, effectively playing backwards starting at self.domain().end() and transitioning over to self.domain().start(). The domain of the new curve is still the same. Read more
Sourceยง

fn repeat(self, count: usize) -> Result<RepeatCurve<T, Self>, RepeatError>

Create a new Curve repeating this curve N times, producing another curve with outputs of the same type. The domain of the new curve will be bigger by a factor of n + 1. Read more
Sourceยง

fn forever(self) -> Result<ForeverCurve<T, Self>, RepeatError>

Create a new Curve repeating this curve forever, producing another curve with outputs of the same type. The domain of the new curve will be unbounded. Read more
Sourceยง

fn ping_pong(self) -> Result<PingPongCurve<T, Self>, PingPongError>

Create a new Curve chaining the original curve with its inverse, producing another curve with outputs of the same type. The domain of the new curve will be twice as long. The transition point is guaranteed to not make any jumps. Read more
Sourceยง

fn chain_continue<C>( self, other: C, ) -> Result<ContinuationCurve<T, Self, C>, ChainError>
where T: VectorSpace, C: Curve<T>,

Create a new Curve by composing this curve end-to-start with another, producing another curve with outputs of the same type. The domain of the other curve is translated so that its start coincides with where this curve ends. Read more
Sourceยง

fn samples( &self, samples: usize, ) -> Result<impl Iterator<Item = T>, ResamplingError>

Extract an iterator over evenly-spaced samples from this curve. Read more
Sourceยง

fn by_ref(&self) -> &Self

Borrow this curve rather than taking ownership of it. This is essentially an alias for a prefix &; the point is that intermediate operations can be performed while retaining access to the original curve. Read more
Sourceยง

fn flip<U, V>(self) -> impl Curve<(V, U)>
where Self: CurveExt<(U, V)>,

Flip this curve so that its tuple output is arranged the other way.
Sourceยง

impl<C, T> CurveResampleExt<T> for C
where C: Curve<T> + ?Sized,

Sourceยง

fn resample<I>( &self, segments: usize, interpolation: I, ) -> Result<SampleCurve<T, I>, ResamplingError>
where I: Fn(&T, &T, f32) -> T,

Resample this Curve to produce a new one that is defined by interpolation over equally spaced sample values, using the provided interpolation to interpolate between adjacent samples. The curve is interpolated on segments segments between samples. For example, if segments is 1, only the start and end points of the curve are used as samples; if segments is 2, a sample at the midpoint is taken as well, and so on. Read more
Sourceยง

fn resample_auto( &self, segments: usize, ) -> Result<SampleAutoCurve<T>, ResamplingError>

Resample this Curve to produce a new one that is defined by interpolation over equally spaced sample values, using automatic interpolation to interpolate between adjacent samples. The curve is interpolated on segments segments between samples. For example, if segments is 1, only the start and end points of the curve are used as samples; if segments is 2, a sample at the midpoint is taken as well, and so on. Read more
Sourceยง

fn resample_uneven<I>( &self, sample_times: impl IntoIterator<Item = f32>, interpolation: I, ) -> Result<UnevenSampleCurve<T, I>, ResamplingError>
where I: Fn(&T, &T, f32) -> T,

Resample this Curve to produce a new one that is defined by interpolation over samples taken at a given set of times. The given interpolation is used to interpolate adjacent samples, and the sample_times are expected to contain at least two valid times within the curveโ€™s domain interval. Read more
Sourceยง

fn resample_uneven_auto( &self, sample_times: impl IntoIterator<Item = f32>, ) -> Result<UnevenSampleAutoCurve<T>, ResamplingError>

Resample this Curve to produce a new one that is defined by automatic interpolation over samples taken at the given set of times. The given sample_times are expected to contain at least two valid times within the curveโ€™s domain interval. Read more
Sourceยง

impl<T, C> CurveWithDerivative<T> for C
where T: HasTangent, C: SampleDerivative<T>,

Sourceยง

fn with_derivative(self) -> SampleDerivativeWrapper<C>

This curve, but with its first derivative included in sampling. Read more
Sourceยง

impl<T> Downcast for T
where T: Any,

Sourceยง

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
Sourceยง

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Sourceยง

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Anyโ€™s vtable from &Traitโ€™s.
Sourceยง

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Anyโ€™s vtable from &mut Traitโ€™s.
Sourceยง

impl<T> DowncastSend for T
where T: Any + Send,

Sourceยง

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Sourceยง

impl<T> DynamicTypePath for T
where T: TypePath,

Sourceยง

impl<T> DynamicTyped for T
where T: Typed,

Sourceยง

impl<T> From<T> for T

Sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

Sourceยง

impl<T> FromWorld for T
where T: Default,

Sourceยง

fn from_world(_world: &mut World) -> T

Creates Self using default().

Sourceยง

impl<T> GetPath for T
where T: Reflect + ?Sized,

Sourceยง

fn reflect_path<'p>( &self, path: impl ReflectPath<'p>, ) -> Result<&(dyn PartialReflect + 'static), ReflectPathError<'p>>

Returns a reference to the value specified by path. Read more
Sourceยง

fn reflect_path_mut<'p>( &mut self, path: impl ReflectPath<'p>, ) -> Result<&mut (dyn PartialReflect + 'static), ReflectPathError<'p>>

Returns a mutable reference to the value specified by path. Read more
Sourceยง

fn path<'p, T>( &self, path: impl ReflectPath<'p>, ) -> Result<&T, ReflectPathError<'p>>
where T: Reflect,

Returns a statically typed reference to the value specified by path. Read more
Sourceยง

fn path_mut<'p, T>( &mut self, path: impl ReflectPath<'p>, ) -> Result<&mut T, ReflectPathError<'p>>
where T: Reflect,

Returns a statically typed mutable reference to the value specified by path. Read more
Sourceยง

impl<S> GetTupleStructField for S
where S: TupleStruct,

Sourceยง

fn get_field<T>(&self, index: usize) -> Option<&T>
where T: Reflect,

Returns a reference to the value of the field with index index, downcast to T.
Sourceยง

fn get_field_mut<T>(&mut self, index: usize) -> Option<&mut T>
where T: Reflect,

Returns a mutable reference to the value of the field with index index, downcast to T.
Sourceยง

impl<T, W> HasTypeWitness<W> for T
where W: MakeTypeWitness<Arg = T>, T: ?Sized,

Sourceยง

const WITNESS: W = W::MAKE

A constant of the type witness
Sourceยง

impl<T> Identity for T
where T: ?Sized,

Sourceยง

const TYPE_EQ: TypeEq<T, <T as Identity>::Type> = TypeEq::NEW

Proof that Self is the same type as Self::Type, provides methods for casting between Self and Self::Type.
Sourceยง

type Type = T

The same type as Self, used to emulate type equality bounds (T == U) with associated type equality constraints (T: Identity<Type = U>).
Sourceยง

impl<T> Instrument for T

Sourceยง

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Sourceยง

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Sourceยง

impl<T, U> Into<U> for T
where U: From<T>,

Sourceยง

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Sourceยง

impl<T> IntoEither for T

Sourceยง

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Sourceยง

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
Sourceยง

impl<T> IntoResult<T> for T

Sourceยง

fn into_result(self) -> Result<T, RunSystemError>

Converts this type into the system output type.
Sourceยง

impl<A> Is for A
where A: Any,

Sourceยง

fn is<T>() -> bool
where T: Any,

Checks if the current type โ€œisโ€ another type, using a TypeId equality comparison. This is most useful in the context of generic logic. Read more
Sourceยง

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Sourceยง

type Target = T

๐Ÿ”ฌThis is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Sourceยง

impl<R> Rng for R
where R: RngCore + ?Sized,

Sourceยง

fn random<T>(&mut self) -> T

Return a random value via the StandardUniform distribution. Read more
Sourceยง

fn random_iter<T>(self) -> Iter<StandardUniform, Self, T>

Return an iterator over random variates Read more
Sourceยง

fn random_range<T, R>(&mut self, range: R) -> T
where T: SampleUniform, R: SampleRange<T>,

Generate a random value in the given range. Read more
Sourceยง

fn random_bool(&mut self, p: f64) -> bool

Return a bool with a probability p of being true. Read more
Sourceยง

fn random_ratio(&mut self, numerator: u32, denominator: u32) -> bool

Return a bool with a probability of numerator/denominator of being true. Read more
Sourceยง

fn sample<T, D>(&mut self, distr: D) -> T
where D: Distribution<T>,

Sample a new value, using the given distribution. Read more
Sourceยง

fn sample_iter<T, D>(self, distr: D) -> Iter<D, Self, T>
where D: Distribution<T>, Self: Sized,

Create an iterator that generates values using the given distribution. Read more
Sourceยง

fn fill<T>(&mut self, dest: &mut T)
where T: Fill + ?Sized,

Fill any type implementing Fill with random data Read more
Sourceยง

fn gen<T>(&mut self) -> T

๐Ÿ‘ŽDeprecated since 0.9.0: Renamed to random to avoid conflict with the new gen keyword in Rust 2024.
Alias for Rng::random.
Sourceยง

fn gen_range<T, R>(&mut self, range: R) -> T
where T: SampleUniform, R: SampleRange<T>,

๐Ÿ‘ŽDeprecated since 0.9.0: Renamed to random_range
Sourceยง

fn gen_bool(&mut self, p: f64) -> bool

๐Ÿ‘ŽDeprecated since 0.9.0: Renamed to random_bool
Alias for Rng::random_bool.
Sourceยง

fn gen_ratio(&mut self, numerator: u32, denominator: u32) -> bool

๐Ÿ‘ŽDeprecated since 0.9.0: Renamed to random_ratio
Sourceยง

impl<T> RngCore for T
where T: DerefMut, <T as Deref>::Target: RngCore,

Sourceยง

fn next_u32(&mut self) -> u32

Return the next random u32. Read more
Sourceยง

fn next_u64(&mut self) -> u64

Return the next random u64. Read more
Sourceยง

fn fill_bytes(&mut self, dst: &mut [u8])

Fill dest with random data. Read more
Sourceยง

impl<T, C, D> SampleDerivative<T> for D
where T: HasTangent, C: SampleDerivative<T> + ?Sized, D: Deref<Target = C>,

Sourceยง

fn sample_with_derivative_unchecked(&self, t: f32) -> WithDerivative<T>

Sample this curve at the parameter value t, extracting the associated value in addition to its derivative. This is the unchecked version of sampling, which should only be used if the sample time t is already known to lie within the curveโ€™s domain. Read more
Sourceยง

fn sample_with_derivative(&self, t: f32) -> Option<WithDerivative<T>>

Sample this curveโ€™s value and derivative at the parameter value t, returning None if the point is outside of the curveโ€™s domain.
Sourceยง

fn sample_with_derivative_clamped(&self, t: f32) -> WithDerivative<T>

Sample this curveโ€™s value and derivative at the parameter value t, clamping t to lie inside the domain of the curve.
Sourceยง

impl<T> ToOwned for T
where T: Clone,

Sourceยง

type Owned = T

The resulting type after obtaining ownership.
Sourceยง

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Sourceยง

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Sourceยง

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Sourceยง

type Error = Infallible

The type returned in the event of a conversion error.
Sourceยง

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Sourceยง

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Sourceยง

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Sourceยง

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Sourceยง

impl<R> TryRngCore for R
where R: RngCore + ?Sized,

Sourceยง

type Error = Infallible

The type returned in the event of a RNG error.
Sourceยง

fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>

Return the next random u32.
Sourceยง

fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>

Return the next random u64.
Sourceยง

fn try_fill_bytes( &mut self, dst: &mut [u8], ) -> Result<(), <R as TryRngCore>::Error>

Fill dest entirely with random data.
Sourceยง

fn unwrap_err(self) -> UnwrapErr<Self>
where Self: Sized,

Wrap RNG with the UnwrapErr wrapper.
Sourceยง

fn unwrap_mut(&mut self) -> UnwrapMut<'_, Self>

Wrap RNG with the UnwrapMut wrapper.
Sourceยง

fn read_adapter(&mut self) -> RngReadAdapter<'_, Self>
where Self: Sized,

Convert an RngCore to a RngReadAdapter.
Sourceยง

impl<T> TypeData for T
where T: 'static + Send + Sync + Clone,

Sourceยง

fn clone_type_data(&self) -> Box<dyn TypeData>

Creates a type-erased clone of this value.
Sourceยง

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Sourceยง

fn vzip(self) -> V

Sourceยง

impl<T> WithSubscriber for T

Sourceยง

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Sourceยง

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Sourceยง

impl<T> ConditionalSend for T
where T: Send,

Sourceยง

impl<T> CryptoRng for T
where T: DerefMut, <T as Deref>::Target: CryptoRng,

Sourceยง

impl<T> Reflectable for T

Sourceยง

impl<T> Settings for T
where T: 'static + Send + Sync,

Sourceยง

impl<R> TryCryptoRng for R
where R: CryptoRng + ?Sized,

Sourceยง

impl<T> WasmNotSend for T
where T: Send,

Sourceยง

impl<T> WasmNotSendSync for T

Sourceยง

impl<T> WasmNotSync for T
where T: Sync,