pub trait Default: Sized {
    // Required method
    fn default() -> Self;
}
Available on non-crate feature miri-test-libstd only.
Expand description

A trait for giving a type a useful default value.

Sometimes, you want to fall back to some kind of default value, and don’t particularly care what it is. This comes up often with structs that define a set of options:

struct SomeOptions {
    foo: i32,
    bar: f32,
}

How can we define some default values? You can use Default:

#[derive(Default)]
struct SomeOptions {
    foo: i32,
    bar: f32,
}

fn main() {
    let options: SomeOptions = Default::default();
}

Now, you get all of the default values. Rust implements Default for various primitives types.

If you want to override a particular option, but still retain the other defaults:

fn main() {
    let options = SomeOptions { foo: 42, ..Default::default() };
}

§Derivable

This trait can be used with #[derive] if all of the type’s fields implement Default. When derived, it will use the default value for each field’s type.

§enums

When using #[derive(Default)] on an enum, you need to choose which unit variant will be default. You do this by placing the #[default] attribute on the variant.

#[derive(Default)]
enum Kind {
    #[default]
    A,
    B,
    C,
}

You cannot use the #[default] attribute on non-unit or non-exhaustive variants.

§How can I implement Default?

Provide an implementation for the default() method that returns the value of your type that should be the default:

enum Kind {
    A,
    B,
    C,
}

impl Default for Kind {
    fn default() -> Self { Kind::A }
}

§Examples

#[derive(Default)]
struct SomeOptions {
    foo: i32,
    bar: f32,
}

Required Methods§

source

fn default() -> Self

Returns the “default value” for a type.

Default values are often some kind of initial value, identity value, or anything else that may make sense as a default.

§Examples

Using built-in default values:

let i: i8 = Default::default();
let (x, y): (Option<String>, f64) = Default::default();
let (a, b, (c, d)): (i32, u32, (bool, bool)) = Default::default();

Making your own:

enum Kind {
    A,
    B,
    C,
}

impl Default for Kind {
    fn default() -> Self { Kind::A }
}

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Default for &str

1.10.0 · source§

impl Default for &CStr

1.9.0 · source§

impl Default for &OsStr

1.28.0 · source§

impl Default for &mut str

source§

impl Default for PreferredCompression

source§

impl Default for ContextType

source§

impl Default for PollNext

source§

impl Default for PrefilterConfig

source§

impl Default for HpkeAead

source§

impl Default for HpkeKdf

source§

impl Default for rustls::quic::Version

source§

impl Default for rustls::quic::Version

source§

impl Default for MonthRepr

Creates a modifier that indicates the value uses the Numerical representation.

source§

impl Default for Padding

Creates a modifier that indicates the value is padded with zeroes.

source§

impl Default for SubsecondDigits

Creates a modifier that indicates the stringified value contains one or more digits.

source§

impl Default for UnixTimestampPrecision

Creates a modifier that indicates the value represents the number of seconds since the Unix epoch.

source§

impl Default for WeekNumberRepr

Creates a modifier that indicates that the value uses the Iso representation.

source§

impl Default for WeekdayRepr

Creates a modifier that indicates the value uses the Long representation.

source§

impl Default for YearRepr

Creates a modifier that indicates the value uses the Full representation.

source§

impl Default for MissedTickBehavior

source§

impl Default for bool

source§

impl Default for char

source§

impl Default for f32

source§

impl Default for f64

source§

impl Default for i8

source§

impl Default for i16

source§

impl Default for i32

source§

impl Default for i64

source§

impl Default for i128

source§

impl Default for isize

source§

impl Default for u8

source§

impl Default for u16

source§

impl Default for u32

source§

impl Default for u64

source§

impl Default for u128

source§

impl Default for ()

source§

impl Default for usize

source§

impl Default for CompressionOptions

source§

impl Default for AllowList

The default cache_for is 1 hour.

source§

impl Default for Rule

Gives content-security-policy: default-src 'self'; style-src 'self' 'unsafe-inline'.

source§

impl Default for ValueSet

source§

impl Default for Plugins

Available on crate feature handover only.
source§

impl Default for kvarn::extensions::Extensions

source§

impl Default for Options

source§

impl Default for LimitManager

Default is Self::new(10, 10, 10).

source§

impl Default for RunConfig

source§

impl Default for Settings

source§

impl Default for kvarn::prelude::fs::OpenOptions

source§

impl Default for Bytes

source§

impl Default for BytesMut

source§

impl Default for CompactString

1.3.0 · source§

impl Default for kvarn::prelude::Duration

source§

impl Default for Method

1.17.0 · source§

impl Default for PathBuf

source§

impl Default for StatusCode

source§

impl Default for Uri

Returns a Uri representing /

source§

impl Default for kvarn::prelude::Version

source§

impl Default for WriteableBytes

source§

impl Default for SipHasher

1.33.0 · source§

impl Default for PhantomPinned

source§

impl Default for RangeFull

source§

impl Default for Alignment

Returns Alignment::MIN, which is valid for any type.

source§

impl Default for AtomicBool

Available on target_has_atomic_load_store="8" only.
1.34.0 · source§

impl Default for AtomicI8

1.34.0 · source§

impl Default for AtomicI16

1.34.0 · source§

impl Default for AtomicI32

1.34.0 · source§

impl Default for AtomicI64

source§

impl Default for AtomicIsize

1.34.0 · source§

impl Default for AtomicU8

1.34.0 · source§

impl Default for AtomicU16

1.34.0 · source§

impl Default for AtomicU32

1.34.0 · source§

impl Default for AtomicU64

source§

impl Default for AtomicUsize

source§

impl Default for Error

source§

impl Default for kvarn::prelude::utils::prelude::io::Empty

source§

impl Default for Sink

source§

impl Default for kvarn::prelude::utils::prelude::uri::Builder

source§

impl Default for Parts

source§

impl Default for Global

1.17.0 · source§

impl Default for Box<str>

Available on non-no_global_oom_handling only.
1.17.0 · source§

impl Default for Box<CStr>

1.17.0 · source§

impl Default for Box<OsStr>

1.10.0 · source§

impl Default for CString

source§

impl Default for String

1.28.0 · source§

impl Default for System

1.9.0 · source§

impl Default for OsString

1.75.0 · source§

impl Default for FileTimes

1.13.0 · source§

impl Default for DefaultHasher

1.7.0 · source§

impl Default for RandomState

1.75.0 · source§

impl Default for ExitCode

The default value is ExitCode::SUCCESS

1.73.0 · source§

impl Default for ExitStatus

The default value is one which indicates successful completion.

1.10.0 · source§

impl Default for std::sync::condvar::Condvar

source§

impl Default for Adler32

source§

impl Default for GeneralPurposeConfig

source§

impl Default for BroCatli

source§

impl Default for ZopfliNode

source§

impl Default for StartPosQueue

source§

impl Default for BrotliEncoderParams

source§

impl Default for H9Opts

source§

impl Default for HistogramPair

source§

impl Default for brotli::enc::command::Command

source§

impl Default for HuffmanTree

source§

impl Default for Array264i

source§

impl Default for Array528i

source§

impl Default for Array712i

source§

impl Default for EmptyIVec

source§

impl Default for HistogramCommand

source§

impl Default for HistogramDistance

source§

impl Default for HistogramLiteral

source§

impl Default for BlockSwitch

source§

impl Default for LiteralBlockSwitch

source§

impl Default for LiteralPredictionModeNibble

source§

impl Default for SliceOffset

source§

impl Default for MultiThreadedSpawner

source§

impl Default for PDF

source§

impl Default for SingleThreadedSpawner

source§

impl Default for BroccoliState

source§

impl Default for FixedBitSet

source§

impl Default for Crc

source§

impl Default for GzBuilder

source§

impl Default for GzHeader

source§

impl Default for Compression

source§

impl Default for h2::client::Builder

source§

impl Default for h2::server::Builder

source§

impl Default for http::extensions::Extensions

source§

impl Default for http::request::Builder

source§

impl Default for http::response::Builder

source§

impl Default for itoa::Buffer

source§

impl Default for kvarn_tokio_uring::fs::create_dir_all::DirBuilder

source§

impl Default for StatxBuilder

source§

impl Default for FinderBuilder

source§

impl Default for EvictionPolicy

source§

impl Default for BigInt

source§

impl Default for BigUint

source§

impl Default for Time

source§

impl Default for ThreadRng

source§

impl Default for rustls::client::client_conn::Resumption

source§

impl Default for rustls::client::client_conn::Resumption

source§

impl Default for Iv

source§

impl Default for DeframerVecBuffer

source§

impl Default for rustls::msgs::deframer::MessageDeframer

source§

impl Default for rustls::msgs::deframer::MessageDeframer

source§

impl Default for rustls::msgs::fragmenter::MessageFragmenter

source§

impl Default for rustls::msgs::fragmenter::MessageFragmenter

source§

impl Default for CertificateChain

source§

impl Default for HpkeSymmetricCipherSuite

source§

impl Default for rustls::server::server_conn::Acceptor

source§

impl Default for rustls::server::server_conn::Acceptor

source§

impl Default for rustls::server::server_conn::ServerConnectionData

source§

impl Default for rustls::server::server_conn::ServerConnectionData

source§

impl Default for ryu::buffer::Buffer

source§

impl Default for Sha1Core

source§

impl Default for time::duration::Duration

source§

impl Default for Day

Creates a modifier that indicates the value is padded with zeroes.

source§

impl Default for End

Creates a modifier used to represent the end of input.

source§

impl Default for Hour

Creates a modifier that indicates the value is padded with zeroes and has the 24-hour representation.

source§

impl Default for Minute

Creates a modifier that indicates the value is padded with zeroes.

source§

impl Default for Month

Creates an instance of this type that indicates the value uses the Numerical representation, is padded with zeroes, and is case-sensitive when parsing.

source§

impl Default for OffsetHour

Creates a modifier that indicates the value only uses a sign for negative values and is padded with zeroes.

source§

impl Default for OffsetMinute

Creates a modifier that indicates the value is padded with zeroes.

source§

impl Default for OffsetSecond

Creates a modifier that indicates the value is padded with zeroes.

source§

impl Default for Ordinal

Creates a modifier that indicates the value is padded with zeroes.

source§

impl Default for Period

Creates a modifier that indicates the value uses the upper-case representation and is case-sensitive when parsing.

source§

impl Default for Second

Creates a modifier that indicates the value is padded with zeroes.

source§

impl Default for Subsecond

Creates a modifier that indicates the stringified value contains one or more digits.

source§

impl Default for UnixTimestamp

Creates a modifier that indicates the value represents the number of seconds since the Unix epoch. The sign is not mandatory.

source§

impl Default for WeekNumber

Creates a modifier that indicates that the value is padded with zeroes and uses the Iso representation.

source§

impl Default for Weekday

Creates a modifier that indicates the value uses the Long representation and is case-sensitive when parsing. If the representation is changed to a numerical one, the instance defaults to one-based indexing.

source§

impl Default for Year

Creates a modifier that indicates the value uses the Full representation, is padded with zeroes, uses the Gregorian calendar as its base, and only includes the year’s sign if necessary.

source§

impl Default for tokio::fs::dir_builder::DirBuilder

source§

impl Default for tokio::fs::open_options::OpenOptions

source§

impl Default for tokio::net::unix::pipe::OpenOptions

source§

impl Default for Notify

source§

impl Default for LocalSet

source§

impl Default for B0

source§

impl Default for B1

source§

impl Default for Z0

source§

impl Default for Equal

source§

impl Default for Greater

source§

impl Default for Less

source§

impl Default for UTerm

source§

impl Default for Braced

source§

impl Default for Hyphenated

source§

impl Default for Simple

source§

impl Default for Urn

source§

impl Default for Uuid

source§

impl Default for NoContext

source§

impl Default for ReasonCode

source§

impl Default for OsRng

source§

impl Default for Csp

source§

impl Default for Vary

§

impl Default for AckFrequencyConfig

§

impl Default for AnyDelimiterCodec

§

impl Default for AtomicWaker

§

impl Default for Backoff

§

impl Default for BbrConfig

§

impl Default for BigEndian

§

impl Default for Builder

§

impl Default for BytesCodec

§

impl Default for CancellationToken

§

impl Default for Collector

§

impl Default for CompressorOxide

§

impl Default for Condvar

§

impl Default for Config

§

impl Default for ConnectionStats

§

impl Default for CubicConfig

§

impl Default for DecompressorOxide

§

impl Default for Dispatch

§

impl Default for Eager

§

impl Default for EndpointConfig

Available on crate feature ring only.
§

impl Default for Event

§

impl Default for EventAttributes

§

impl Default for EventKind

§

impl Default for FnvHasher

§

impl Default for FormatterOptions

§

impl Default for FrameHeader

§

impl Default for FrameStats

§

impl Default for FxHasher

§

impl Default for Hasher

§

impl Default for HuffmanCode

§

impl Default for IdleTimeout

§

impl Default for InflateState

§

impl Default for InvalidBufferSize

§

impl Default for InvalidOutputSize

§

impl Default for Lazy

§

impl Default for LengthDelimitedCodec

§

impl Default for LinesCodec

§

impl Default for LittleEndian

§

impl Default for LocalPool

§

impl Default for MtuDiscoveryConfig

§

impl Default for NewRenoConfig

§

impl Default for NoSubscriber

§

impl Default for Null

§

impl Default for Once

§

impl Default for OnceBool

§

impl Default for OnceNonZeroUsize

§

impl Default for OpenHow

§

impl Default for Parker

§

impl Default for PathStats

§

impl Default for Probe

§

impl Default for RandomConnectionIdGenerator

§

impl Default for RecvMeta

§

impl Default for Rng

§

impl Default for Specification

Available on crate feature alloc only.
§

impl Default for SpinWait

§

impl Default for StandardAlloc

§

impl Default for Timespec

§

impl Default for TransportConfig

§

impl Default for UdpStats

§

impl Default for UnparkResult

§

impl Default for VarInt

§

impl Default for WaitGroup

§

impl Default for WebSocketConfig

§

impl Default for Written

§

impl Default for vec128_storage

§

impl Default for vec256_storage

§

impl Default for vec512_storage

source§

impl<'a> Default for InputReference<'a>

source§

impl<'a> Default for InputReferenceMut<'a>

source§

impl<'a> Default for MetadataBuilder<'a>

source§

impl<'a> Default for RecordBuilder<'a>

§

impl<'a> Default for OidRegistry<'a>

§

impl<'a> Default for Select<'a>

1.70.0 · source§

impl<'a, K, V> Default for alloc::collections::btree::map::Iter<'a, K, V>
where K: 'a, V: 'a,

1.70.0 · source§

impl<'a, K, V> Default for alloc::collections::btree::map::IterMut<'a, K, V>
where K: 'a, V: 'a,

§

impl<'a, T> Default for AllocatedStackMemory<'a, T>
where T: 'a,

§

impl<'a, T> Default for HeapPrealloc<'a, T>
where T: 'a,

§

impl<'a, T> Default for OnceRef<'a, T>

§

impl<'prev, 'now> Default for SubmitArgs<'prev, 'now>
where 'prev: 'now,

§

impl<'s, T> Default for SliceVec<'s, T>

§

impl<A> Default for ArrayVec<A>
where A: Array,

§

impl<A> Default for SmallVec<A>
where A: Array,

§

impl<A> Default for TinyVec<A>
where A: Array,

1.70.0 · source§

impl<A, B> Default for Chain<A, B>
where A: Default, B: Default,

source§

impl<Alloc> Default for UnionHasher<Alloc>
where Alloc: Allocator<u16> + Allocator<u32>,

source§

impl<AllocU8, AllocU16, AllocI32, AllocU32, AllocU64, AllocCommand, AllocFloatX, AllocV8, AllocS16, AllocPDF, AllocStaticCommand, AllocHistogramLiteral, AllocHistogramCommand, AllocHistogramDistance, AllocHistogramPair, AllocContextType, AllocHuffmanTree, AllocZopfliNode> Default for CombiningAllocator<AllocU8, AllocU16, AllocI32, AllocU32, AllocU64, AllocCommand, AllocFloatX, AllocV8, AllocS16, AllocPDF, AllocStaticCommand, AllocHistogramLiteral, AllocHistogramCommand, AllocHistogramDistance, AllocHistogramPair, AllocContextType, AllocHuffmanTree, AllocZopfliNode>
where AllocU8: Allocator<u8> + Default, AllocU16: Allocator<u16> + Default, AllocI32: Allocator<i32> + Default, AllocU32: Allocator<u32> + Default, AllocU64: Allocator<u64> + Default, AllocCommand: Allocator<Command> + Default, AllocFloatX: Allocator<f32> + Default, AllocV8: Allocator<CompatF8> + Default, AllocS16: Allocator<Compat16x16> + Default, AllocPDF: Allocator<PDF> + Default, AllocStaticCommand: Allocator<Command<SliceOffset>> + Default, AllocHistogramLiteral: Allocator<HistogramLiteral> + Default, AllocHistogramCommand: Allocator<HistogramCommand> + Default, AllocHistogramDistance: Allocator<HistogramDistance> + Default, AllocHistogramPair: Allocator<HistogramPair> + Default, AllocContextType: Allocator<ContextType> + Default, AllocHuffmanTree: Allocator<HuffmanTree> + Default, AllocZopfliNode: Allocator<ZopfliNode> + Default,

§

impl<AllocU32, AllocHC> Default for HuffmanTreeGroup<AllocU32, AllocHC>
where AllocU32: Allocator<u32>, AllocHC: Allocator<HuffmanCode>,

1.11.0 · source§

impl<B> Default for Cow<'_, B>
where B: ToOwned + ?Sized, <B as ToOwned>::Owned: Default,

source§

impl<B> Default for Control<B>

The default is Continue.

§

impl<BlockSize, Kind> Default for BlockBuffer<BlockSize, Kind>
where BlockSize: ArrayLength<u8> + IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>, <BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero, Kind: BufferKind,

source§

impl<E, Ix> Default for List<E, Ix>
where E: Default, Ix: Default + IndexType,

source§

impl<F> Default for OptionFuture<F>

source§

impl<Fut> Default for FuturesOrdered<Fut>
where Fut: Future,

source§

impl<Fut> Default for FuturesUnordered<Fut>

1.7.0 · source§

impl<H> Default for BuildHasherDefault<H>

1.70.0 · source§

impl<I> Default for Cloned<I>
where I: Default,

1.70.0 · source§

impl<I> Default for Copied<I>
where I: Default,

1.70.0 · source§

impl<I> Default for Enumerate<I>
where I: Default,

1.70.0 · source§

impl<I> Default for Flatten<I>
where I: Default + Iterator, <I as Iterator>::Item: IntoIterator,

1.70.0 · source§

impl<I> Default for Fuse<I>
where I: Default,

1.70.0 · source§

impl<I> Default for Rev<I>
where I: Default,

source§

impl<Idx> Default for kvarn::prelude::utils::prelude::compact_str::core::ops::Range<Idx>
where Idx: Default,

source§

impl<Ix> Default for EdgeIndex<Ix>
where Ix: Default,

source§

impl<Ix> Default for NodeIndex<Ix>
where Ix: Default,

source§

impl<K, S> Default for DashSet<K, S>
where K: Eq + Hash, S: Default + BuildHasher + Clone,

§

impl<K, V> Default for &Slice<K, V>

§

impl<K, V> Default for &mut Slice<K, V>

§

impl<K, V> Default for Box<Slice<K, V>>

source§

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

1.70.0 · source§

impl<K, V> Default for alloc::collections::btree::map::Keys<'_, K, V>

1.70.0 · source§

impl<K, V> Default for alloc::collections::btree::map::Range<'_, K, V>

1.70.0 · source§

impl<K, V> Default for alloc::collections::btree::map::Values<'_, K, V>

source§

impl<K, V> Default for CacheBuilder<K, V, Cache<K, V>>
where K: Eq + Hash + Send + Sync + 'static, V: Clone + Send + Sync + 'static,

§

impl<K, V> Default for IntoIter<K, V>

§

impl<K, V> Default for IntoKeys<K, V>

§

impl<K, V> Default for IntoValues<K, V>

§

impl<K, V> Default for Iter<'_, K, V>

§

impl<K, V> Default for IterMut<'_, K, V>

§

impl<K, V> Default for Keys<'_, K, V>

§

impl<K, V> Default for Values<'_, K, V>

§

impl<K, V> Default for ValuesMut<'_, K, V>

1.70.0 · source§

impl<K, V, A> Default for alloc::collections::btree::map::IntoIter<K, V, A>
where A: Allocator + Default + Clone,

1.70.0 · source§

impl<K, V, A> Default for alloc::collections::btree::map::IntoKeys<K, V, A>
where A: Allocator + Default + Clone,

1.70.0 · source§

impl<K, V, A> Default for alloc::collections::btree::map::IntoValues<K, V, A>
where A: Allocator + Default + Clone,

source§

impl<K, V, S> Default for kvarn::prelude::HashMap<K, V, S>
where S: Default,

source§

impl<K, V, S> Default for DashMap<K, V, S>
where K: Eq + Hash, S: Default + BuildHasher + Clone,

§

impl<K, V, S> Default for IndexMap<K, V, S>
where S: Default,

§

impl<K, V, S, A> Default for HashMap<K, V, S, A>
where S: Default, A: Default + Allocator,

source§

impl<K: Hash + Eq + Send + Sync + 'static, V: Clone + Send + Sync + 'static> Default for MokaCache<K, V>

source§

impl<N> Default for TarjanScc<N>

source§

impl<N, E, Ty> Default for GraphMap<N, E, Ty>
where N: NodeTrait, Ty: EdgeType,

Create a new empty GraphMap.

source§

impl<N, E, Ty, Ix> Default for Csr<N, E, Ty, Ix>
where Ty: EdgeType, Ix: IndexType,

source§

impl<N, E, Ty, Ix> Default for StableGraph<N, E, Ty, Ix>
where Ty: EdgeType, Ix: IndexType,

Create a new empty StableGraph.

source§

impl<N, E, Ty, Ix> Default for Graph<N, E, Ty, Ix>
where Ty: EdgeType, Ix: IndexType,

Create a new empty Graph.

source§

impl<N, E, Ty, Null, Ix> Default for MatrixGraph<N, E, Ty, Null, Ix>
where Ty: EdgeType, Null: Nullable<Wrapped = E>, Ix: IndexType,

Create a new empty MatrixGraph.

source§

impl<N, VM> Default for DfsSpace<N, VM>
where VM: VisitMap<N> + Default,

source§

impl<N, VM> Default for Bfs<N, VM>
where VM: Default,

source§

impl<N, VM> Default for Dfs<N, VM>
where VM: Default,

source§

impl<N, VM> Default for DfsPostOrder<N, VM>
where VM: Default,

source§

impl<N, VM> Default for Topo<N, VM>
where VM: Default,

§

impl<R, G, T> Default for ReentrantMutex<R, G, T>
where R: RawMutex, G: GetThreadId, T: Default + ?Sized,

§

impl<R, T> Default for Mutex<R, T>
where R: RawMutex, T: Default + ?Sized,

§

impl<R, T> Default for RwLock<R, T>
where R: RawRwLock, T: Default + ?Sized,

source§

impl<S> Default for Ascii<S>
where S: Default,

source§

impl<S> Default for UniCase<S>
where S: AsRef<str> + Default,

§

impl<S, C> Default for Builder<S, C>
where S: Default + EntryMarker, C: Default + EntryMarker,

source§

impl<SliceType> Default for brotli::enc::interface::Command<SliceType>
where SliceType: SliceWrapper<u8>,

source§

impl<SliceType> Default for FeatureFlagSliceType<SliceType>
where SliceType: SliceWrapper<u8> + Default,

Available on non-crate feature external-literal-probability only.
source§

impl<St> Default for SelectAll<St>
where St: Stream + Unpin,

source§

impl<T> Default for &[T]

§

impl<T> Default for &Slice<T>

1.5.0 · source§

impl<T> Default for &mut [T]

source§

impl<T> Default for Option<T>

1.4.0 · source§

impl<T> Default for [T; 0]

1.4.0 · source§

impl<T> Default for [T; 1]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 2]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 3]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 4]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 5]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 6]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 7]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 8]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 9]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 10]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 11]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 12]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 13]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 14]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 15]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 16]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 17]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 18]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 19]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 20]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 21]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 22]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 23]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 24]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 25]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 26]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 27]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 28]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 29]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 30]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 31]
where T: Default,

1.4.0 · source§

impl<T> Default for [T; 32]
where T: Default,

source§

impl<T> Default for (T₁, T₂, …, Tₙ)
where T: Default,

This trait is implemented for tuples up to twelve items long.

source§

impl<T> Default for kvarn::prelude::Arc<T>
where T: Default,

Available on non-no_global_oom_handling only.
source§

impl<T> Default for HeaderMap<T>

source§

impl<T> Default for kvarn::prelude::Mutex<T>
where T: Default,

source§

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

source§

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

source§

impl<T> Default for kvarn::prelude::RwLock<T>
where T: Default + ?Sized,

source§

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

source§

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

1.70.0 · source§

impl<T> Default for kvarn::prelude::utils::prelude::compact_str::core::cell::OnceCell<T>

source§

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

source§

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

1.10.0 · source§

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

1.19.0 · source§

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

1.2.0 · source§

impl<T> Default for kvarn::prelude::utils::prelude::compact_str::core::iter::Empty<T>

source§

impl<T> Default for PhantomData<T>
where T: ?Sized,

1.20.0 · source§

impl<T> Default for ManuallyDrop<T>
where T: Default + ?Sized,

1.74.0 · source§

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

source§

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

1.62.0 · source§

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

1.70.0 · source§

impl<T> Default for kvarn::prelude::utils::prelude::compact_str::core::slice::Iter<'_, T>

1.70.0 · source§

impl<T> Default for kvarn::prelude::utils::prelude::compact_str::core::slice::IterMut<'_, T>

source§

impl<T> Default for AtomicPtr<T>

Available on target_has_atomic_load_store="ptr" only.
source§

impl<T> Default for Exclusive<T>
where T: Default + ?Sized,

source§

impl<T> Default for kvarn::prelude::utils::prelude::io::Cursor<T>
where T: Default,

source§

impl<T> Default for Box<[T]>

Available on non-no_global_oom_handling only.
§

impl<T> Default for Box<Slice<T>>

source§

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

Available on non-no_global_oom_handling only.
source§

impl<T> Default for BinaryHeap<T>
where T: Ord,

1.70.0 · source§

impl<T> Default for alloc::collections::binary_heap::IntoIter<T>

source§

impl<T> Default for BTreeSet<T>

1.70.0 · source§

impl<T> Default for alloc::collections::btree::set::Iter<'_, T>

1.70.0 · source§

impl<T> Default for alloc::collections::btree::set::Range<'_, T>

1.70.0 · source§

impl<T> Default for alloc::collections::linked_list::IntoIter<T>

1.70.0 · source§

impl<T> Default for alloc::collections::linked_list::Iter<'_, T>

1.70.0 · source§

impl<T> Default for alloc::collections::linked_list::IterMut<'_, T>

source§

impl<T> Default for LinkedList<T>

source§

impl<T> Default for VecDeque<T>

source§

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

Available on non-no_global_oom_handling only.
1.10.0 · source§

impl<T> Default for alloc::rc::Weak<T>

1.10.0 · source§

impl<T> Default for alloc::sync::Weak<T>

source§

impl<T> Default for Vec<T>

source§

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

1.10.0 · source§

impl<T> Default for std::sync::mutex::Mutex<T>
where T: Default + ?Sized,

1.70.0 · source§

impl<T> Default for OnceLock<T>

1.10.0 · source§

impl<T> Default for std::sync::rwlock::RwLock<T>
where T: Default,

source§

impl<T> Default for FixedQueue<T>

source§

impl<T> Default for SendableMemoryBlock<T>
where T: Default + Clone,

source§

impl<T> Default for futures_util::io::cursor::Cursor<T>
where T: Default,

source§

impl<T> Default for futures_util::lock::mutex::Mutex<T>
where T: Default,

source§

impl<T> Default for NotZero<T>
where T: Zero,

source§

impl<T> Default for tokio::sync::once_cell::OnceCell<T>

source§

impl<T> Default for JoinSet<T>

§

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

§

impl<T> Default for Atomic<T>
where T: Pointable + ?Sized,

§

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

§

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

§

impl<T> Default for CoreWrapper<T>
where T: Default + BufferKindUser, <T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>> + Default, <<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero, <T as BufferKindUser>::BufferKind: Default,

§

impl<T> Default for HeapAlloc<T>
where T: Clone + Default,

§

impl<T> Default for IntoIter<T>

§

impl<T> Default for Iter<'_, T>

§

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

§

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

§

impl<T> Default for Mutex<T>
where T: Default + ?Sized,

§

impl<T> Default for OnceBox<T>

§

impl<T> Default for OnceCell<T>

§

impl<T> Default for OnceCell<T>

§

impl<T> Default for RwLock<T>
where T: Default + ?Sized,

§

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

§

impl<T> Default for Shared<'_, T>
where T: Pointable + ?Sized,

§

impl<T> Default for Slab<T>

§

impl<T> Default for WrapBox<T>

§

impl<T> Default for XofReaderCoreWrapper<T>
where T: Default + XofReaderCore, <T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>> + Default, <<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,

1.70.0 · source§

impl<T, A> Default for alloc::collections::btree::set::IntoIter<T, A>
where A: Allocator + Default + Clone,

1.70.0 · source§

impl<T, A> Default for alloc::vec::into_iter::IntoIter<T, A>
where A: Allocator + Default,

§

impl<T, A> Default for HashTable<T, A>
where A: Allocator + Default,

§

impl<T, A> Default for RawTable<T, A>
where A: Allocator + Default,

§

impl<T, N> Default for GenericArray<T, N>
where T: Default, N: ArrayLength<T>,

§

impl<T, OutSize, O> Default for CtVariableCoreWrapper<T, OutSize, O>
where T: VariableOutputCore, OutSize: ArrayLength<u8> + IsLessOrEqual<<T as OutputSizeUser>::OutputSize>, <OutSize as IsLessOrEqual<<T as OutputSizeUser>::OutputSize>>::Output: NonZero, <T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>, <<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,

§

impl<T, R> Default for Once<T, R>

source§

impl<T, S> Default for std::collections::hash::set::HashSet<T, S>
where S: Default,

§

impl<T, S> Default for IndexSet<T, S>
where S: Default,

§

impl<T, S, A> Default for HashSet<T, S, A>
where S: Default, A: Default + Allocator,

source§

impl<T, const N: usize> Default for Mask<T, N>

source§

impl<T, const N: usize> Default for Simd<T, N>

§

impl<T, const N: usize> Default for AtomicTagPtr<T, N>

§

impl<T, const N: usize> Default for TagPtr<T, N>

§

impl<Ty> Default for MemoryBlock<Ty>
where Ty: Default,

Available on crate feature std only.
source§

impl<U> Default for NInt<U>
where U: Default + Unsigned + NonZero,

source§

impl<U> Default for PInt<U>
where U: Default + Unsigned + NonZero,

source§

impl<U, B> Default for UInt<U, B>
where U: Default, B: Default,

§

impl<Z> Default for Zeroizing<Z>
where Z: Default + Zeroize,

§

impl<const CHUNK_SIZE: usize> Default for ReadBuffer<CHUNK_SIZE>

§

impl<const MIN: i8, const MAX: i8> Default for OptionRangedI8<MIN, MAX>

§

impl<const MIN: i16, const MAX: i16> Default for OptionRangedI16<MIN, MAX>

§

impl<const MIN: i32, const MAX: i32> Default for OptionRangedI32<MIN, MAX>

§

impl<const MIN: i64, const MAX: i64> Default for OptionRangedI64<MIN, MAX>

§

impl<const MIN: i128, const MAX: i128> Default for OptionRangedI128<MIN, MAX>

§

impl<const MIN: isize, const MAX: isize> Default for OptionRangedIsize<MIN, MAX>

§

impl<const MIN: u8, const MAX: u8> Default for OptionRangedU8<MIN, MAX>

§

impl<const MIN: u16, const MAX: u16> Default for OptionRangedU16<MIN, MAX>

§

impl<const MIN: u32, const MAX: u32> Default for OptionRangedU32<MIN, MAX>

§

impl<const MIN: u64, const MAX: u64> Default for OptionRangedU64<MIN, MAX>

§

impl<const MIN: u128, const MAX: u128> Default for OptionRangedU128<MIN, MAX>

§

impl<const MIN: usize, const MAX: usize> Default for OptionRangedUsize<MIN, MAX>

§

impl<const SIZE: usize> Default for WriteBuffer<SIZE>