Skip to main content

DrawOrder

Struct DrawOrder 

Source
pub struct DrawOrder(/* private fields */);
Expand description

A struct representing the draw order of an entity Higher draw orders will be drawn on top of lower draw orders

Implementations§

Source§

impl DrawOrder

Source

pub fn new(order: f32) -> DrawOrder

Create a new DrawOrder

Methods from Deref<Target = f32>§

1.43.0 · Source

pub const RADIX: u32 = 2

Source

pub const BITS: u32 = 32

1.43.0 · Source

pub const MANTISSA_DIGITS: u32 = 24

1.43.0 · Source

pub const DIGITS: u32 = 6

1.43.0 · Source

pub const EPSILON: f32 = 1.19209290e-07_f32

1.43.0 · Source

pub const MIN: f32 = -3.40282347e+38_f32

1.43.0 · Source

pub const MIN_POSITIVE: f32 = 1.17549435e-38_f32

1.43.0 · Source

pub const MAX: f32 = 3.40282347e+38_f32

1.43.0 · Source

pub const MIN_EXP: i32 = -125

1.43.0 · Source

pub const MAX_EXP: i32 = 128

1.43.0 · Source

pub const MIN_10_EXP: i32 = -37

1.43.0 · Source

pub const MAX_10_EXP: i32 = 38

1.43.0 · Source

pub const NAN: f32

1.43.0 · Source

pub const INFINITY: f32

1.43.0 · Source

pub const NEG_INFINITY: f32

Source

pub const MAX_EXACT_INTEGER: i32

Source

pub const MIN_EXACT_INTEGER: i32

Source

pub const SIGN_MASK: u32 = 0x8000_0000

Source

pub const EXPONENT_MASK: u32 = 0x7f80_0000

Source

pub const MANTISSA_MASK: u32 = 0x007f_ffff

1.62.0 · Source

pub fn total_cmp(&self, other: &f32) -> Ordering

Returns the ordering between self and other.

Unlike the standard partial comparison between floating point numbers, this comparison always produces an ordering in accordance to the totalOrder predicate as defined in the IEEE 754 (2008 revision) floating point standard. The values are ordered in the following sequence:

  • negative quiet NaN
  • negative signaling NaN
  • negative infinity
  • negative numbers
  • negative subnormal numbers
  • negative zero
  • positive zero
  • positive subnormal numbers
  • positive numbers
  • positive infinity
  • positive signaling NaN
  • positive quiet NaN.

The ordering established by this function does not always agree with the PartialOrd and PartialEq implementations of f32. For example, they consider negative and positive zero equal, while total_cmp doesn’t.

The interpretation of the signaling NaN bit follows the definition in the IEEE 754 standard, which may not match the interpretation by some of the older, non-conformant (e.g. MIPS) hardware implementations.

§Example
struct GoodBoy {
    name: String,
    weight: f32,
}

let mut bois = vec![
    GoodBoy { name: "Pucci".to_owned(), weight: 0.1 },
    GoodBoy { name: "Woofer".to_owned(), weight: 99.0 },
    GoodBoy { name: "Yapper".to_owned(), weight: 10.0 },
    GoodBoy { name: "Chonk".to_owned(), weight: f32::INFINITY },
    GoodBoy { name: "Abs. Unit".to_owned(), weight: f32::NAN },
    GoodBoy { name: "Floaty".to_owned(), weight: -5.0 },
];

bois.sort_by(|a, b| a.weight.total_cmp(&b.weight));

// `f32::NAN` could be positive or negative, which will affect the sort order.
if f32::NAN.is_sign_negative() {
    assert!(bois.into_iter().map(|b| b.weight)
        .zip([f32::NAN, -5.0, 0.1, 10.0, 99.0, f32::INFINITY].iter())
        .all(|(a, b)| a.to_bits() == b.to_bits()))
} else {
    assert!(bois.into_iter().map(|b| b.weight)
        .zip([-5.0, 0.1, 10.0, 99.0, f32::INFINITY, f32::NAN].iter())
        .all(|(a, b)| a.to_bits() == b.to_bits()))
}

Trait Implementations§

Source§

impl Add for DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the + operator.
Source§

fn add(self, rhs: DrawOrder) -> <DrawOrder as Add>::Output

Performs the + operation. Read more
Source§

impl Add<&DrawOrder> for DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &DrawOrder) -> <DrawOrder as Add<&DrawOrder>>::Output

Performs the + operation. Read more
Source§

impl Add<&DrawOrder> for &DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &DrawOrder) -> <&DrawOrder as Add<&DrawOrder>>::Output

Performs the + operation. Read more
Source§

impl Add<&DrawOrder> for f32

Source§

type Output = f32

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &DrawOrder) -> <f32 as Add<&DrawOrder>>::Output

Performs the + operation. Read more
Source§

impl Add<DrawOrder> for &DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the + operator.
Source§

fn add(self, rhs: DrawOrder) -> <&DrawOrder as Add<DrawOrder>>::Output

Performs the + operation. Read more
Source§

impl Add<DrawOrder> for f32

Source§

type Output = f32

The resulting type after applying the + operator.
Source§

fn add(self, rhs: DrawOrder) -> <f32 as Add<DrawOrder>>::Output

Performs the + operation. Read more
Source§

impl Add<f32> for DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the + operator.
Source§

fn add(self, rhs: f32) -> <DrawOrder as Add<f32>>::Output

Performs the + operation. Read more
Source§

impl Add<f32> for &DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the + operator.
Source§

fn add(self, rhs: f32) -> <&DrawOrder as Add<f32>>::Output

Performs the + operation. Read more
Source§

impl AddAssign for DrawOrder

Source§

fn add_assign(&mut self, rhs: DrawOrder)

Performs the += operation. Read more
Source§

impl AddAssign<&DrawOrder> for DrawOrder

Source§

fn add_assign(&mut self, rhs: &DrawOrder)

Performs the += operation. Read more
Source§

impl AddAssign<&DrawOrder> for f32

Source§

fn add_assign(&mut self, rhs: &DrawOrder)

Performs the += operation. Read more
Source§

impl AddAssign<DrawOrder> for f32

Source§

fn add_assign(&mut self, rhs: DrawOrder)

Performs the += operation. Read more
Source§

impl AddAssign<f32> for DrawOrder

Source§

fn add_assign(&mut self, rhs: f32)

Performs the += operation. Read more
Source§

impl Clone for DrawOrder

Source§

fn clone(&self) -> DrawOrder

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Component for DrawOrder
where DrawOrder: Send + Sync + 'static,

Source§

const STORAGE_TYPE: StorageType = bevy::ecs::component::StorageType::Table

A constant indicating the storage type used for this component.
Source§

fn register_component_hooks(_hooks: &mut ComponentHooks)

Called when registering this component, allowing mutable access to its ComponentHooks.
Source§

impl Copy for DrawOrder

Source§

impl Debug for DrawOrder

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for DrawOrder

Source§

fn default() -> DrawOrder

Returns the “default value” for a type. Read more
Source§

impl Deref for DrawOrder

Source§

type Target = f32

The resulting type after dereferencing.
Source§

fn deref(&self) -> &<DrawOrder as Deref>::Target

Dereferences the value.
Source§

impl DerefMut for DrawOrder

Source§

fn deref_mut(&mut self) -> &mut <DrawOrder as Deref>::Target

Mutably dereferences the value.
Source§

impl<'de> Deserialize<'de> for DrawOrder

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<DrawOrder, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Div for DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the / operator.
Source§

fn div(self, rhs: DrawOrder) -> <DrawOrder as Div>::Output

Performs the / operation. Read more
Source§

impl Div<&DrawOrder> for DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &DrawOrder) -> <DrawOrder as Div<&DrawOrder>>::Output

Performs the / operation. Read more
Source§

impl Div<&DrawOrder> for &DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &DrawOrder) -> <&DrawOrder as Div<&DrawOrder>>::Output

Performs the / operation. Read more
Source§

impl Div<&DrawOrder> for f32

Source§

type Output = f32

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &DrawOrder) -> <f32 as Div<&DrawOrder>>::Output

Performs the / operation. Read more
Source§

impl Div<DrawOrder> for &DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the / operator.
Source§

fn div(self, rhs: DrawOrder) -> <&DrawOrder as Div<DrawOrder>>::Output

Performs the / operation. Read more
Source§

impl Div<DrawOrder> for f32

Source§

type Output = f32

The resulting type after applying the / operator.
Source§

fn div(self, rhs: DrawOrder) -> <f32 as Div<DrawOrder>>::Output

Performs the / operation. Read more
Source§

impl Div<f32> for DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the / operator.
Source§

fn div(self, rhs: f32) -> <DrawOrder as Div<f32>>::Output

Performs the / operation. Read more
Source§

impl Div<f32> for &DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the / operator.
Source§

fn div(self, rhs: f32) -> <&DrawOrder as Div<f32>>::Output

Performs the / operation. Read more
Source§

impl DivAssign for DrawOrder

Source§

fn div_assign(&mut self, rhs: DrawOrder)

Performs the /= operation. Read more
Source§

impl DivAssign<&DrawOrder> for DrawOrder

Source§

fn div_assign(&mut self, rhs: &DrawOrder)

Performs the /= operation. Read more
Source§

impl DivAssign<&DrawOrder> for f32

Source§

fn div_assign(&mut self, rhs: &DrawOrder)

Performs the /= operation. Read more
Source§

impl DivAssign<DrawOrder> for f32

Source§

fn div_assign(&mut self, rhs: DrawOrder)

Performs the /= operation. Read more
Source§

impl DivAssign<f32> for DrawOrder

Source§

fn div_assign(&mut self, rhs: f32)

Performs the /= operation. Read more
Source§

impl From<&DrawOrder> for f32

Source§

fn from(order: &DrawOrder) -> f32

Converts to this type from the input type.
Source§

impl From<DrawOrder> for f32

Source§

fn from(order: DrawOrder) -> f32

Converts to this type from the input type.
Source§

impl From<f32> for DrawOrder

Source§

fn from(order: f32) -> DrawOrder

Converts to this type from the input type.
Source§

impl FromReflect for DrawOrder
where DrawOrder: Any + Send + Sync, f32: FromReflect + TypePath + RegisterForReflection,

Source§

fn from_reflect(reflect: &(dyn Reflect + 'static)) -> Option<DrawOrder>

Constructs a concrete instance of Self from a reflected value.
Source§

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

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

impl GetTypeRegistration for DrawOrder
where DrawOrder: Any + Send + Sync, f32: FromReflect + TypePath + 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 Mul for DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: DrawOrder) -> <DrawOrder as Mul>::Output

Performs the * operation. Read more
Source§

impl Mul<&DrawOrder> for DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &DrawOrder) -> <DrawOrder as Mul<&DrawOrder>>::Output

Performs the * operation. Read more
Source§

impl Mul<&DrawOrder> for &DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &DrawOrder) -> <&DrawOrder as Mul<&DrawOrder>>::Output

Performs the * operation. Read more
Source§

impl Mul<&DrawOrder> for f32

Source§

type Output = f32

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &DrawOrder) -> <f32 as Mul<&DrawOrder>>::Output

Performs the * operation. Read more
Source§

impl Mul<DrawOrder> for &DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: DrawOrder) -> <&DrawOrder as Mul<DrawOrder>>::Output

Performs the * operation. Read more
Source§

impl Mul<DrawOrder> for f32

Source§

type Output = f32

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: DrawOrder) -> <f32 as Mul<DrawOrder>>::Output

Performs the * operation. Read more
Source§

impl Mul<f32> for DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: f32) -> <DrawOrder as Mul<f32>>::Output

Performs the * operation. Read more
Source§

impl Mul<f32> for &DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: f32) -> <&DrawOrder as Mul<f32>>::Output

Performs the * operation. Read more
Source§

impl MulAssign for DrawOrder

Source§

fn mul_assign(&mut self, rhs: DrawOrder)

Performs the *= operation. Read more
Source§

impl MulAssign<&DrawOrder> for DrawOrder

Source§

fn mul_assign(&mut self, rhs: &DrawOrder)

Performs the *= operation. Read more
Source§

impl MulAssign<&DrawOrder> for f32

Source§

fn mul_assign(&mut self, rhs: &DrawOrder)

Performs the *= operation. Read more
Source§

impl MulAssign<DrawOrder> for f32

Source§

fn mul_assign(&mut self, rhs: DrawOrder)

Performs the *= operation. Read more
Source§

impl MulAssign<f32> for DrawOrder

Source§

fn mul_assign(&mut self, rhs: f32)

Performs the *= operation. Read more
Source§

impl Neg for DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the - operator.
Source§

fn neg(self) -> <DrawOrder as Neg>::Output

Performs the unary - operation. Read more
Source§

impl Neg for &DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the - operator.
Source§

fn neg(self) -> <&DrawOrder as Neg>::Output

Performs the unary - operation. Read more
Source§

impl PartialEq for DrawOrder

Source§

fn eq(&self, other: &DrawOrder) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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 Reflect for DrawOrder
where DrawOrder: Any + Send + Sync, f32: FromReflect + TypePath + 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 into_any(self: Box<DrawOrder>) -> Box<dyn Any>

Returns the value as a Box<dyn Any>.
Source§

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

Returns the value as a &dyn Any.
Source§

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

Returns the value as a &mut dyn Any.
Source§

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

Casts this type to a boxed reflected value.
Source§

fn as_reflect(&self) -> &(dyn Reflect + 'static)

Casts this type to a reflected value.
Source§

fn as_reflect_mut(&mut self) -> &mut (dyn Reflect + 'static)

Casts this type to a mutable reflected value.
Source§

fn clone_value(&self) -> Box<dyn Reflect>

Clones the value as a Reflect trait object. Read more
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§

fn try_apply( &mut self, value: &(dyn Reflect + 'static), ) -> 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<DrawOrder>) -> ReflectOwned

Returns an owned enumeration of “kinds” of type. Read more
Source§

fn reflect_partial_eq(&self, value: &(dyn Reflect + 'static)) -> Option<bool>

Returns a “partial equality” comparison result. Read more
Source§

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

Applies a reflected value to this value. 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 serializable(&self) -> Option<Serializable<'_>>

Returns a serializable version of the value. Read more
Source§

fn is_dynamic(&self) -> bool

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

impl Rem for DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: DrawOrder) -> <DrawOrder as Rem>::Output

Performs the % operation. Read more
Source§

impl Rem<&DrawOrder> for DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &DrawOrder) -> <DrawOrder as Rem<&DrawOrder>>::Output

Performs the % operation. Read more
Source§

impl Rem<&DrawOrder> for &DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &DrawOrder) -> <&DrawOrder as Rem<&DrawOrder>>::Output

Performs the % operation. Read more
Source§

impl Rem<&DrawOrder> for f32

Source§

type Output = f32

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &DrawOrder) -> <f32 as Rem<&DrawOrder>>::Output

Performs the % operation. Read more
Source§

impl Rem<DrawOrder> for &DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: DrawOrder) -> <&DrawOrder as Rem<DrawOrder>>::Output

Performs the % operation. Read more
Source§

impl Rem<DrawOrder> for f32

Source§

type Output = f32

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: DrawOrder) -> <f32 as Rem<DrawOrder>>::Output

Performs the % operation. Read more
Source§

impl Rem<f32> for DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: f32) -> <DrawOrder as Rem<f32>>::Output

Performs the % operation. Read more
Source§

impl Rem<f32> for &DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: f32) -> <&DrawOrder as Rem<f32>>::Output

Performs the % operation. Read more
Source§

impl RemAssign for DrawOrder

Source§

fn rem_assign(&mut self, rhs: DrawOrder)

Performs the %= operation. Read more
Source§

impl RemAssign<&DrawOrder> for DrawOrder

Source§

fn rem_assign(&mut self, rhs: &DrawOrder)

Performs the %= operation. Read more
Source§

impl RemAssign<&DrawOrder> for f32

Source§

fn rem_assign(&mut self, rhs: &DrawOrder)

Performs the %= operation. Read more
Source§

impl RemAssign<DrawOrder> for f32

Source§

fn rem_assign(&mut self, rhs: DrawOrder)

Performs the %= operation. Read more
Source§

impl RemAssign<f32> for DrawOrder

Source§

fn rem_assign(&mut self, rhs: f32)

Performs the %= operation. Read more
Source§

impl Serialize for DrawOrder

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for DrawOrder

Source§

impl Sub for DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: DrawOrder) -> <DrawOrder as Sub>::Output

Performs the - operation. Read more
Source§

impl Sub<&DrawOrder> for DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &DrawOrder) -> <DrawOrder as Sub<&DrawOrder>>::Output

Performs the - operation. Read more
Source§

impl Sub<&DrawOrder> for &DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &DrawOrder) -> <&DrawOrder as Sub<&DrawOrder>>::Output

Performs the - operation. Read more
Source§

impl Sub<&DrawOrder> for f32

Source§

type Output = f32

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &DrawOrder) -> <f32 as Sub<&DrawOrder>>::Output

Performs the - operation. Read more
Source§

impl Sub<DrawOrder> for &DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: DrawOrder) -> <&DrawOrder as Sub<DrawOrder>>::Output

Performs the - operation. Read more
Source§

impl Sub<DrawOrder> for f32

Source§

type Output = f32

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: DrawOrder) -> <f32 as Sub<DrawOrder>>::Output

Performs the - operation. Read more
Source§

impl Sub<f32> for DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: f32) -> <DrawOrder as Sub<f32>>::Output

Performs the - operation. Read more
Source§

impl Sub<f32> for &DrawOrder

Source§

type Output = DrawOrder

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: f32) -> <&DrawOrder as Sub<f32>>::Output

Performs the - operation. Read more
Source§

impl SubAssign for DrawOrder

Source§

fn sub_assign(&mut self, rhs: DrawOrder)

Performs the -= operation. Read more
Source§

impl SubAssign<&DrawOrder> for DrawOrder

Source§

fn sub_assign(&mut self, rhs: &DrawOrder)

Performs the -= operation. Read more
Source§

impl SubAssign<&DrawOrder> for f32

Source§

fn sub_assign(&mut self, rhs: &DrawOrder)

Performs the -= operation. Read more
Source§

impl SubAssign<DrawOrder> for f32

Source§

fn sub_assign(&mut self, rhs: DrawOrder)

Performs the -= operation. Read more
Source§

impl SubAssign<f32> for DrawOrder

Source§

fn sub_assign(&mut self, rhs: f32)

Performs the -= operation. Read more
Source§

impl TupleStruct for DrawOrder
where DrawOrder: Any + Send + Sync, f32: FromReflect + TypePath + RegisterForReflection,

Source§

fn field(&self, index: usize) -> Option<&(dyn Reflect + 'static)>

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 Reflect + 'static)>

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 clone_dynamic(&self) -> DynamicTupleStruct

Clones the struct into a DynamicTupleStruct.
Source§

impl TypePath for DrawOrder
where DrawOrder: Any + Send + Sync,

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 Typed for DrawOrder
where DrawOrder: Any + Send + Sync, f32: FromReflect + TypePath + RegisterForReflection,

Source§

fn type_info() -> &'static TypeInfo

Returns the compile-time info for the underlying type.

Auto Trait Implementations§

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<C> Bundle for C
where C: Component,

Source§

fn component_ids( components: &mut Components, storages: &mut Storages, ids: &mut impl FnMut(ComponentId), )

Source§

unsafe fn from_components<T, F>(ctx: &mut T, func: &mut F) -> C
where F: for<'a> FnMut(&'a mut T) -> OwningPtr<'a>, C: Sized,

Source§

fn get_component_ids( components: &Components, ids: &mut impl FnMut(Option<ComponentId>), )

Gets this Bundle’s component ids. This will be None if the component has not been registered.
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> ConditionalSend for T
where T: Send,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

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

Source§

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

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

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

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

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

Convert &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)

Convert &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> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

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

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

Source§

impl<C> DynamicBundle for C
where C: Component,

Source§

fn get_components(self, func: &mut impl FnMut(StorageType, OwningPtr<'_>))

Source§

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

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

Source§

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

Source§

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

Creates Self using data from the given World.
Source§

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

Source§

fn reflect_path<'p>( &self, path: impl ReflectPath<'p>, ) -> Result<&(dyn Reflect + '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 Reflect + '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, Rhs> NumAssignOps<Rhs> for T
where T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

Source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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<T, Base> RefNum<Base> for T
where T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,

Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

Source§

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

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> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

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<T> TypeData for T
where T: 'static + Send + Sync + Clone,

Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

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

Source§

impl<T> WasmNotSendSync for T

Source§

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

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