pub type DefaultIx = u32;
Expand description

The default integer type for graph indices. u32 is the default to reduce the size of the graph’s data and improve performance in the common case.

Used for node and edge indices in Graph and StableGraph, used for node indices in Csr.

Trait Implementations§

1.0.0 · source§

impl Binary for u32

source§

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

Formats the value using the given formatter.
source§

impl BoundedMeasure for u32

source§

fn min() -> u32

source§

fn max() -> u32

source§

fn overflowing_add(self, rhs: u32) -> (u32, bool)

1.0.0 · source§

impl Clone for u32

source§

fn clone(&self) -> u32

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
§

impl CreateFrom for u32

§

fn create_from<B>(reader: &mut Reader<B>) -> u32where B: BufferRef,

1.0.0 · source§

impl Debug for u32

source§

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

Formats the value using the given formatter. Read more
1.0.0 · source§

impl Default for u32

source§

fn default() -> u32

Returns the default value of 0

source§

impl<'de> Deserialize<'de> for u32

source§

fn deserialize<D>( deserializer: D ) -> Result<u32, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
1.0.0 · source§

impl Display for u32

source§

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

Formats the value using the given formatter. Read more
§

impl From<Gid> for u32

§

fn from(gid: Gid) -> u32

Converts to this type from the input type.
1.1.0 · source§

impl From<Ipv4Addr> for u32

source§

fn from(ip: Ipv4Addr) -> u32

Uses Ipv4Addr::to_bits to convert an IPv4 address to a host byte order u32.

§

impl From<Mode> for u32

§

fn from(mode: Mode) -> u32

Support conversions from Mode to raw mode values.

use rustix::fs::{Mode, RawMode};
assert_eq!(RawMode::from(Mode::RWXU), 0o700);
§

impl From<Mode> for u32

§

fn from(mode: Mode) -> u32

Support conversions from Mode to raw mode values.

use rustix::fs::{Mode, RawMode};
assert_eq!(RawMode::from(Mode::RWXU), 0o700);
§

impl From<NonMaxU32> for u32

§

fn from(value: NonMaxU32) -> u32

Converts to this type from the input type.
1.31.0 · source§

impl From<NonZeroU32> for u32

source§

fn from(nonzero: NonZeroU32) -> u32

Converts a NonZeroU32 into an u32

§

impl From<Sample> for u32

§

fn from(s: Sample) -> u32

Converts to this type from the input type.
§

impl From<Uid> for u32

§

fn from(uid: Uid) -> u32

Converts to this type from the input type.
1.28.0 · source§

impl From<bool> for u32

source§

fn from(small: bool) -> u32

Converts a bool to a u32. The resulting value is 0 for false and 1 for true values.

Examples
assert_eq!(u32::from(true), 1);
assert_eq!(u32::from(false), 0);
1.13.0 · source§

impl From<char> for u32

source§

fn from(c: char) -> u32

Converts a char into a u32.

Examples
use std::mem;

let c = 'c';
let u = u32::from(c);
assert!(4 == mem::size_of_val(&u))
1.5.0 · source§

impl From<u16> for u32

source§

fn from(small: u16) -> u32

Converts u16 to u32 losslessly.

1.5.0 · source§

impl From<u8> for u32

source§

fn from(small: u8) -> u32

Converts u8 to u32 losslessly.

§

impl FromReflect for u32

§

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

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

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

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

impl GetTypeRegistration for u32

source§

impl IndexType for u32

source§

fn new(x: usize) -> u32

source§

fn index(&self) -> usize

source§

fn max() -> u32

source§

impl<'de, E> IntoDeserializer<'de, E> for u32where E: Error,

§

type Deserializer = U32Deserializer<E>

The type of the deserializer being converted into.
source§

fn into_deserializer(self) -> U32Deserializer<E>

Convert this value into a deserializer.
1.42.0 · source§

impl LowerExp for u32

source§

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

Formats the value using the given formatter.
1.0.0 · source§

impl LowerHex for u32

source§

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

Formats the value using the given formatter.
1.0.0 · source§

impl Octal for u32

source§

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

Formats the value using the given formatter.
§

impl ReadFrom for u32

§

fn read_from<B>(&mut self, reader: &mut Reader<B>)where B: BufferRef,

§

impl Reflect for u32

§

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

Returns the TypeInfo of the type represented by this value. Read more
§

fn into_any(self: Box<u32, Global>) -> Box<dyn Any, Global>

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

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

Returns the value as a &dyn Any.
§

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

Returns the value as a &mut dyn Any.
§

fn into_reflect(self: Box<u32, Global>) -> Box<dyn Reflect, Global>

Casts this type to a boxed reflected value.
§

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

Casts this type to a reflected value.
§

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

Casts this type to a mutable reflected value.
§

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

Clones the value as a Reflect trait object. Read more
§

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

Applies a reflected value to this value. Read more
§

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

Performs a type-checked assignment of a reflected value to this value. Read more
§

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

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

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

Returns a mutable enumeration of “kinds” of type. Read more
§

fn reflect_owned(self: Box<u32, Global>) -> ReflectOwned

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

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

Returns a hash of the value (which includes the type). Read more
§

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

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

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

Debug formatter for the value. Read more
§

fn serializable(&self) -> Option<Serializable<'_>>

Returns a serializable version of the value. Read more
§

fn is_dynamic(&self) -> bool

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

impl Sample for u32

§

type Signed = i32

When summing two samples of a signal together, it is necessary for both samples to be represented in some signed format. This associated Addition type represents the format to which Self should be converted for optimal Addition performance. Read more
§

type Float = f32

When multiplying two samples of a signal together, it is necessary for both samples to be represented in some signed, floating-point format. This associated Multiplication type represents the format to which Self should be converted for optimal Multiplication performance. Read more
§

const EQUILIBRIUM: u32 = 2_147_483_648u32

The equilibrium value for the wave that this Sample type represents. This is normally the value that is equal distance from both the min and max ranges of the sample. Read more
§

const IDENTITY: Self::Float = <Self::Float as FloatSample>::IDENTITY

The multiplicative identity of the signal. Read more
§

fn to_sample<S>(self) -> Swhere Self: ToSample<S>,

Convert self to any type that implements FromSample<Self>. Read more
§

fn from_sample<S>(s: S) -> Selfwhere Self: FromSample<S>,

Create a Self from any type that implements ToSample<Self>. Read more
§

fn to_signed_sample(self) -> Self::Signed

Converts self to the equivalent Sample in the associated Signed format. Read more
§

fn to_float_sample(self) -> Self::Float

Converts self to the equivalent Sample in the associated Float format. Read more
§

fn add_amp(self, amp: Self::Signed) -> Self

Adds (or “offsets”) the amplitude of the Sample by the given signed amplitude. Read more
§

fn mul_amp(self, amp: Self::Float) -> Self

Multiplies (or “scales”) the amplitude of the Sample by the given float amplitude. Read more
source§

impl Serialize for u32

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
§

impl ShaderSize for u32

§

const SHADER_SIZE: NonZeroU64 = _

Represents WGSL Size (equivalent to ShaderType::min_size)
§

impl ShaderType for u32

§

fn min_size() -> NonZeroU64

Represents the minimum size of Self (equivalent to GPUBufferBindingLayout.minBindingSize) Read more
§

fn size(&self) -> NonZeroU64

Returns the size of Self at runtime Read more
§

fn assert_uniform_compat()

§

impl SparseSetIndex for u32

§

fn sparse_set_index(&self) -> usize

Gets the sparse set index corresponding to this instance.
§

fn get_sparse_set_index(value: usize) -> u32

Creates a new instance of this type with the specified index.
§

impl<'a> TryFrom<&'a OwnedValue> for u32

§

type Error = Error

The type returned in the event of a conversion error.
§

fn try_from( v: &'a OwnedValue ) -> Result<u32, <u32 as TryFrom<&'a OwnedValue>>::Error>

Performs the conversion.
§

impl<'a> TryFrom<&'a Value<'a>> for u32

§

type Error = Error

The type returned in the event of a conversion error.
§

fn try_from( value: &'a Value<'_> ) -> Result<u32, <u32 as TryFrom<&'a Value<'a>>>::Error>

Performs the conversion.
§

impl TryFrom<OwnedValue> for u32

§

type Error = Error

The type returned in the event of a conversion error.
§

fn try_from(v: OwnedValue) -> Result<u32, <u32 as TryFrom<OwnedValue>>::Error>

Performs the conversion.
§

impl<'a> TryFrom<Value<'a>> for u32

§

type Error = Error

The type returned in the event of a conversion error.
§

fn try_from(value: Value<'a>) -> Result<u32, <u32 as TryFrom<Value<'a>>>::Error>

Performs the conversion.
1.34.0 · source§

impl TryFrom<i128> for u32

source§

fn try_from(u: i128) -> Result<u32, <u32 as TryFrom<i128>>::Error>

Try to create the target number type from a source number type. This returns an error if the source value is outside of the range of the target type.

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
1.34.0 · source§

impl TryFrom<i16> for u32

source§

fn try_from(u: i16) -> Result<u32, <u32 as TryFrom<i16>>::Error>

Try to create the target number type from a source number type. This returns an error if the source value is outside of the range of the target type.

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
1.34.0 · source§

impl TryFrom<i32> for u32

source§

fn try_from(u: i32) -> Result<u32, <u32 as TryFrom<i32>>::Error>

Try to create the target number type from a source number type. This returns an error if the source value is outside of the range of the target type.

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
1.34.0 · source§

impl TryFrom<i64> for u32

source§

fn try_from(u: i64) -> Result<u32, <u32 as TryFrom<i64>>::Error>

Try to create the target number type from a source number type. This returns an error if the source value is outside of the range of the target type.

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
1.34.0 · source§

impl TryFrom<i8> for u32

source§

fn try_from(u: i8) -> Result<u32, <u32 as TryFrom<i8>>::Error>

Try to create the target number type from a source number type. This returns an error if the source value is outside of the range of the target type.

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
1.34.0 · source§

impl TryFrom<isize> for u32

source§

fn try_from(u: isize) -> Result<u32, <u32 as TryFrom<isize>>::Error>

Try to create the target number type from a source number type. This returns an error if the source value is outside of the range of the target type.

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
1.34.0 · source§

impl TryFrom<u128> for u32

source§

fn try_from(u: u128) -> Result<u32, <u32 as TryFrom<u128>>::Error>

Try to create the target number type from a source number type. This returns an error if the source value is outside of the range of the target type.

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
1.34.0 · source§

impl TryFrom<u64> for u32

source§

fn try_from(u: u64) -> Result<u32, <u32 as TryFrom<u64>>::Error>

Try to create the target number type from a source number type. This returns an error if the source value is outside of the range of the target type.

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
1.34.0 · source§

impl TryFrom<usize> for u32

source§

fn try_from(u: usize) -> Result<u32, <u32 as TryFrom<usize>>::Error>

Try to create the target number type from a source number type. This returns an error if the source value is outside of the range of the target type.

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
§

impl TypePath for u32

§

fn type_path() -> &'static str

Returns the fully qualified path of the underlying type. Read more
§

fn short_type_path() -> &'static str

Returns a short, pretty-print enabled path to the type. Read more
§

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

Returns the name of the type, or None if it is anonymous. Read more
§

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

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

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

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

impl TypeUuid for u32

§

const TYPE_UUID: Uuid = _

§

impl Typed for u32

§

fn type_info() -> &'static TypeInfo

Returns the compile-time info for the underlying type.
1.42.0 · source§

impl UpperExp for u32

source§

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

Formats the value using the given formatter.
1.0.0 · source§

impl UpperHex for u32

source§

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

Formats the value using the given formatter.
§

impl Value for u32

§

fn record(&self, key: &Field, visitor: &mut dyn Visit)

Visits this value with the given Visitor.
§

impl WriteInto for u32

§

fn write_into<B>(&self, writer: &mut Writer<B>)where B: BufferMut,

source§

impl Zero for u32

source§

fn zero() -> u32

Return the singleton object which can be used as a sentinel value.
source§

fn is_zero(&self) -> bool

Return true if self is equal to the sentinel value.
§

impl Zeroable for u32

§

fn zeroed() -> Self

§

impl Pod for u32

§

impl VectorScalar for u32