devela::all

Trait ConstDefault

Source
pub trait ConstDefault {
    const DEFAULT: Self;
}
Expand description

A trait for giving a type a useful default value in compile-time.

Required Associated Constants§

Source

const DEFAULT: Self

Returns the compile-time “default value” for a type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ConstDefault for &str

Source§

const DEFAULT: Self = ""

Source§

impl ConstDefault for &mut str

Available on crate feature unsafe_str only.
Source§

const DEFAULT: Self

Source§

impl ConstDefault for bool

Source§

const DEFAULT: Self = false

Source§

impl ConstDefault for char

Source§

const DEFAULT: Self = '\0'

Source§

impl ConstDefault for f32

Source§

const DEFAULT: Self = 0f32

Source§

impl ConstDefault for f64

Source§

const DEFAULT: Self = 0f64

Source§

impl ConstDefault for i8

Source§

const DEFAULT: Self = 0i8

Source§

impl ConstDefault for i16

Source§

const DEFAULT: Self = 0i16

Source§

impl ConstDefault for i32

Source§

const DEFAULT: Self = 0i32

Source§

impl ConstDefault for i64

Source§

const DEFAULT: Self = 0i64

Source§

impl ConstDefault for i128

Source§

const DEFAULT: Self = 0i128

Source§

impl ConstDefault for isize

Source§

const DEFAULT: Self = 0isize

Source§

impl ConstDefault for u8

Source§

const DEFAULT: Self = 0u8

Source§

impl ConstDefault for u16

Source§

const DEFAULT: Self = 0u16

Source§

impl ConstDefault for u32

Source§

const DEFAULT: Self = 0u32

Source§

impl ConstDefault for u64

Source§

const DEFAULT: Self = 0u64

Source§

impl ConstDefault for u128

Source§

const DEFAULT: Self = 0u128

Source§

impl ConstDefault for ()

Source§

const DEFAULT: Self = ()

Source§

impl ConstDefault for usize

Source§

const DEFAULT: Self = 0usize

Source§

impl<T> ConstDefault for &[T]

Source§

const DEFAULT: Self

Source§

impl<T> ConstDefault for *const T

Source§

const DEFAULT: Self

Source§

impl<T> ConstDefault for *mut T

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 0]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 1]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 2]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 3]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 4]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 5]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 6]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 7]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 8]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 9]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 10]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 11]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 12]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 13]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 14]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 15]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 16]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 17]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 18]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 19]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 20]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 21]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 22]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 23]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 24]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 25]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 26]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 27]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 28]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 29]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 30]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 31]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for [T; 32]

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for (T, T)

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for (T, T, T)

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for (T, T, T, T)

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for (T, T, T, T, T)

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for (T, T, T, T, T, T)

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for (T, T, T, T, T, T, T)

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for (T, T, T, T, T, T, T, T)

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for (T, T, T, T, T, T, T, T, T)

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for (T, T, T, T, T, T, T, T, T, T)

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for (T, T, T, T, T, T, T, T, T, T, T)

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for (T, T, T, T, T, T, T, T, T, T, T, T)

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for (T,)

Source§

const DEFAULT: Self

Implementors§

Source§

impl ConstDefault for &CStr

Source§

const DEFAULT: Self

Source§

impl ConstDefault for Sign

Source§

const DEFAULT: Self = Sign::None

Source§

impl ConstDefault for AsciiChar

Source§

const DEFAULT: Self = AsciiChar::Null

Source§

impl ConstDefault for ExitCode

Available on crate feature std only.
Source§

const DEFAULT: Self = Self::SUCCESS

Source§

impl ConstDefault for Duration

Source§

const DEFAULT: Self

Source§

impl ConstDefault for char7

Source§

const DEFAULT: Self

Source§

impl ConstDefault for char8

Source§

const DEFAULT: Self

Source§

impl ConstDefault for char16

Source§

const DEFAULT: Self

Source§

impl ConstDefault for AtomicF32

Source§

const DEFAULT: Self

Source§

impl ConstDefault for AtomicF64

Source§

const DEFAULT: Self

Source§

impl ConstDefault for AtomicI8

Source§

const DEFAULT: Self

Source§

impl ConstDefault for AtomicI16

Source§

const DEFAULT: Self

Source§

impl ConstDefault for AtomicI32

Source§

const DEFAULT: Self

Source§

impl ConstDefault for AtomicI64

Source§

const DEFAULT: Self

Source§

impl ConstDefault for AtomicI128

Source§

const DEFAULT: Self

Source§

impl ConstDefault for AtomicIsize

Source§

const DEFAULT: Self

Source§

impl ConstDefault for AtomicU8

Source§

const DEFAULT: Self

Source§

impl ConstDefault for AtomicU16

Source§

const DEFAULT: Self

Source§

impl ConstDefault for AtomicU32

Source§

const DEFAULT: Self

Source§

impl ConstDefault for AtomicU64

Source§

const DEFAULT: Self

Source§

impl ConstDefault for AtomicU128

Source§

const DEFAULT: Self

Source§

impl ConstDefault for AtomicUsize

Source§

const DEFAULT: Self

Source§

impl ConstDefault for Condvar

Available on crate feature std only.
Source§

const DEFAULT: Self

Source§

impl ConstDefault for Once

Available on crate feature std only.
Source§

const DEFAULT: Self

Source§

impl ConstDefault for Boxed

Available on crate feature alloc only.
Source§

const DEFAULT: Self = Boxed

Source§

impl ConstDefault for HasherFnv<u32>

Source§

const DEFAULT: Self

Source§

impl ConstDefault for HasherFnv<u64>

Source§

const DEFAULT: Self

Source§

impl ConstDefault for HasherFnv<u128>

Source§

const DEFAULT: Self

Source§

impl ConstDefault for HasherFnv<usize>

Source§

const DEFAULT: Self

Source§

impl ConstDefault for HasherFx<u32>

Source§

const DEFAULT: Self

Source§

impl ConstDefault for HasherFx<u64>

Source§

const DEFAULT: Self

Source§

impl ConstDefault for HasherFx<usize>

Source§

const DEFAULT: Self

Source§

impl ConstDefault for HasherPengy

Source§

const DEFAULT: Self

Source§

impl ConstDefault for Lgc16

Available on crate feature rand only.
Source§

const DEFAULT: Self

Source§

impl ConstDefault for PhantomPinned

Source§

const DEFAULT: Self = Self

Source§

impl ConstDefault for RangeFull

Source§

const DEFAULT: Self = Self

Source§

impl ConstDefault for String

Source§

const DEFAULT: Self

Source§

impl ConstDefault for Xabc

Available on crate feature rand only.
Source§

const DEFAULT: Self

Source§

impl ConstDefault for XorShift8

Available on crate feature rand only.
Source§

const DEFAULT: Self

Source§

impl ConstDefault for XorShift16

Available on crate feature rand only.
Source§

const DEFAULT: Self

Source§

impl ConstDefault for XorShift32

Available on crate feature rand only.
Source§

const DEFAULT: Self

Source§

impl ConstDefault for XorShift64

Available on crate feature rand only.
Source§

const DEFAULT: Self

Source§

impl ConstDefault for XorShift128

Available on crate feature rand only.
Source§

const DEFAULT: Self

Source§

impl ConstDefault for XorShift128p

Available on crate feature rand only.
Source§

const DEFAULT: Self

Source§

impl ConstDefault for Xoroshiro128pp

Available on crate feature rand only.
Source§

const DEFAULT: Self

Source§

impl ConstDefault for Xyza8a

Available on crate feature rand only.
Source§

const DEFAULT: Self

Source§

impl ConstDefault for Xyza8b

Available on crate feature rand only.
Source§

const DEFAULT: Self

Source§

impl ConstDefault for devela::_info::examples::niche::NonExtremeI8

Available on doc only.
Source§

const DEFAULT: Self

Source§

impl ConstDefault for devela::all::NonExtremeI8

Source§

const DEFAULT: Self

Source§

impl ConstDefault for NonExtremeU8

Source§

const DEFAULT: Self

Source§

impl ConstDefault for NonExtremeU16

Source§

const DEFAULT: Self

Source§

impl<K, V> ConstDefault for BTreeMap<K, V>

Source§

const DEFAULT: Self

Source§

impl<N: ConstDefault, H: ConstDefault> ConstDefault for Mismatch<N, H>

Source§

const DEFAULT: Self

Source§

impl<S: ConstDefault, V: ConstDefault> ConstDefault for Own<S, V>

Source§

const DEFAULT: Self

Source§

impl<T> ConstDefault for Interval<T>

Provides a const default value for Interval, the unbounded interval $(-\infty, \infty)$.

See the Default implementation for more information.

See Default for more information.

Source§

const DEFAULT: Self

Source§

impl<T> ConstDefault for AtomicPtr<T>

Source§

const DEFAULT: Self

Source§

impl<T> ConstDefault for BTreeSet<T>

Source§

const DEFAULT: Self

Source§

impl<T> ConstDefault for ConstList<'_, T>

Source§

const DEFAULT: Self

Source§

impl<T> ConstDefault for LinkedList<T>

Source§

const DEFAULT: Self

Source§

impl<T> ConstDefault for PhantomData<T>

Source§

const DEFAULT: Self = Self

Source§

impl<T> ConstDefault for TypeResource<T>

Source§

const DEFAULT: Self

Source§

impl<T> ConstDefault for Vec<T>

Source§

const DEFAULT: Self

Source§

impl<T> ConstDefault for VecDeque<T>

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for Option<T>

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for LazyLock<T>

Available on crate feature std only.
Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for Cast<T>

Available on prim··· only.
Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for Reverse<T>

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for Weak<T>

Available on crate feature std only.
Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for Atomic<T>

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for Mutex<T>

Available on crate feature std only.
Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for OnceLock<T>

Available on crate feature std only.
Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for RwLock<T>

Available on crate feature std only.
Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for Angle<T>

Available on crate feature geom only.
Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for BareBox<T>

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for Cell<T>

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for LazyCell<T>

Available on crate feature std only.
Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for ManuallyDrop<T>

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for OnceCell<T>

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for AssertUnwindSafe<T>

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for Range<T>

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for RangeFrom<T>

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for RangeInclusive<T>

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for RangeTo<T>

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for RangeToInclusive<T>

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for RcWeak<T>

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for RefCell<T>

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for Saturating<T>

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for UnsafeCell<T>

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault> ConstDefault for Wrapping<T>

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault, const C: usize, const R: usize, const CR: usize, const RMAJ: bool> ConstDefault for Array2d<T, C, R, CR, RMAJ, Bare>

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault, const CAP: usize> ConstDefault for Array<T, CAP, Bare>

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault, const CAP: usize, IDX: ConstDefault> ConstDefault for Destaque<T, CAP, IDX, Bare>

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault, const CAP: usize, IDX: ConstDefault> ConstDefault for Stack<T, CAP, IDX, Bare>

Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault, const D: usize> ConstDefault for Extent<T, D>

Available on crate feature geom only.
Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault, const D: usize> ConstDefault for Point<T, D>

Available on crate feature geom only.
Source§

const DEFAULT: Self

Source§

impl<T: ConstDefault, const D: usize> ConstDefault for Vector<T, D>

Available on crate feature alg only.
Source§

const DEFAULT: Self

Source§

impl<T: MemPod, const CAP: usize> ConstDefault for DstArray<T, CAP>

Available on crate feature unsafe_layout only.
Source§

const DEFAULT: Self

Source§

impl<const CAP: usize> ConstDefault for GraphemeNonul<CAP>

Source§

const DEFAULT: Self

Source§

impl<const CAP: usize> ConstDefault for GraphemeU8<CAP>

Source§

const DEFAULT: Self

Source§

impl<const CAP: usize> ConstDefault for StringNonul<CAP>

Available on crate feature _string_nonul only.
Source§

const DEFAULT: Self

Source§

impl<const CAP: usize> ConstDefault for StringU8<CAP>

Source§

const DEFAULT: Self

Source§

impl<const CAP: usize> ConstDefault for StringU16<CAP>

Source§

const DEFAULT: Self

Source§

impl<const CAP: usize> ConstDefault for StringU32<CAP>

Source§

const DEFAULT: Self

Source§

impl<const CAP: usize> ConstDefault for StringUsize<CAP>

Source§

const DEFAULT: Self

Source§

impl<const SH1: usize, const SH2: usize, const SH3: usize> ConstDefault for XorShift8Custom<SH1, SH2, SH3>

Available on crate feature rand only.
Source§

const DEFAULT: Self