pub trait Default: Sized {
    // Required method
    fn default() -> Self;
}
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 PartitionDatabaseUpdates

source§

impl Default for PrimaryRoleBadgeWithdrawAttemptState

source§

impl Default for PrimaryRoleLockingState

source§

impl Default for PrimaryRoleRecoveryAttemptState

source§

impl Default for RecoveryRoleBadgeWithdrawAttemptState

source§

impl Default for RecoveryRoleRecoveryAttemptState

source§

impl Default for SystemLockData

source§

impl Default for OnApplyCost

source§

impl Default for NodeStateUpdates

source§

impl Default for PartitionStateUpdates

source§

impl Default for BlueprintType

source§

impl Default for FunctionAuth

source§

impl Default for MethodAuthTemplate

source§

impl Default for Level

source§

impl Default for OuterObjectInfo

source§

impl Default for OwnerRole

source§

impl Default for PackageRoyaltyConfig

source§

impl Default for WithdrawStrategy

source§

impl Default for PathArguments

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 DatabaseUpdates

source§

impl Default for NodeDatabaseUpdates

source§

impl Default for AccessControllerFeatureSet

source§

impl Default for AccountFeatureSet

source§

impl Default for ConsensusManagerFeatureSet

source§

impl Default for ProposalStatistic

source§

impl Default for ValidatorFeatureSet

source§

impl Default for PackageFeatureSet

source§

impl Default for MultiResourcePoolFeatureSet

source§

impl Default for OneResourcePoolFeatureSet

source§

impl Default for TwoResourcePoolFeatureSet

source§

impl Default for AuthZone

source§

impl Default for FungibleResourceManagerFeatureSet

source§

impl Default for FungibleVaultFeatureSet

source§

impl Default for NonFungibleResourceManagerFeatureSet

source§

impl Default for NonFungibleVaultFeatureSet

source§

impl Default for CallFrameMessage

source§

impl Default for MetadataFeatureSet

source§

impl Default for RoleAssignmentFeatureSet

source§

impl Default for ComponentRoyaltyFeatureSet

source§

impl Default for ComponentRoyaltyDatabaseChecker

source§

impl Default for ResourceCounter

source§

impl Default for ResourceDatabaseChecker

source§

impl Default for ResourceDatabaseCheckerResults

source§

impl Default for ResourceEventChecker

source§

impl Default for ResourceEventCheckerResults

source§

impl Default for RoleAssignmentDatabaseChecker

source§

impl Default for NodeCounts

source§

impl Default for SystemLoanFeeReserve

source§

impl Default for FeeReserveFinalizationSummary

source§

impl Default for LegacyStateUpdates

source§

impl Default for StateUpdates

source§

impl Default for StateUpdateSummary

source§

impl Default for SystemStructure

source§

impl Default for CostingParameters

source§

impl Default for FeeDestination

source§

impl Default for FeeLocks

source§

impl Default for FeeSource

source§

impl Default for ResourcesUsage

source§

impl Default for TransactionExecutionTrace

source§

impl Default for TransactionFeeDetails

source§

impl Default for TransactionFeeSummary

source§

impl Default for VmVersion

source§

impl Default for ScryptoV1WasmValidator

source§

impl Default for WasmiEngine

source§

impl Default for InstructionWeights

source§

impl Default for EpochChangeCondition

source§

impl Default for AuthConfig

source§

impl Default for BlueprintDefinitionInit

source§

impl Default for BlueprintVersion

source§

impl Default for PackageDefinition

source§

impl Default for StaticRoleDefinition

§

impl Default for BlueprintEventSchemaInit

§

impl Default for BlueprintFunctionsSchemaInit

§

impl Default for BlueprintHooksInit

§

impl Default for BlueprintSchemaInit

§

impl Default for BlueprintStateSchemaInit

§

impl Default for BlueprintTypeSchemaInit

1.17.0 · source§

impl Default for radix_engine::types::Box<str>

1.17.0 · source§

impl Default for radix_engine::types::Box<CStr>

1.17.0 · source§

impl Default for radix_engine::types::Box<OsStr>

source§

impl Default for BurnRoles<Option<AccessRule>>

source§

impl Default for ComponentRoyaltyConfig

source§

impl Default for Decimal

source§

impl Default for DepositRoles<Option<AccessRule>>

source§

impl Default for FreezeRoles<Option<AccessRule>>

source§

impl Default for FungibleResourceRoles

source§

impl Default for GenericArgs

source§

impl Default for I192

source§

impl Default for I256

source§

impl Default for I320

source§

impl Default for I384

source§

impl Default for I448

source§

impl Default for I512

source§

impl Default for I768

source§

impl Default for LengthValidation

source§

impl Default for MintRoles<Option<AccessRule>>

source§

impl Default for NonFungibleDataUpdateRoles<Option<AccessRule>>

source§

impl Default for NonFungibleResourceRoles

source§

impl Default for PreciseDecimal

source§

impl Default for RecallRoles<Option<AccessRule>>

source§

impl Default for RoleAssignmentInit

source§

impl Default for RoleList

source§

impl Default for String

source§

impl Default for U192

source§

impl Default for U256

source§

impl Default for U320

source§

impl Default for U384

source§

impl Default for U448

source§

impl Default for U512

source§

impl Default for U768

source§

impl Default for VaultFrozenFlag

source§

impl Default for WithdrawRoles<Option<AccessRule>>

source§

impl Default for radix_engine::types::radix_engine_common::prelude::fmt::Error

1.10.0 · source§

impl Default for CString

1.3.0 · source§

impl Default for Duration

1.45.0 · source§

impl Default for proc_macro::TokenStream

1.9.0 · source§

impl Default for OsString

1.75.0 · source§

impl Default for FileTimes

source§

impl Default for std::io::util::Empty

source§

impl Default for Sink

1.17.0 · source§

impl Default for PathBuf

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.

source§

impl Default for anyhow::Chain<'_>

source§

impl Default for CompressedEdwardsY

source§

impl Default for EdwardsPoint

source§

impl Default for MontgomeryPoint

source§

impl Default for CompressedRistretto

source§

impl Default for RistrettoPoint

source§

impl Default for Scalar

source§

impl Default for BigInt

source§

impl Default for BigUint

source§

impl Default for proc_macro2::TokenStream

TokenStream::default() returns an empty stream, i.e. this is equivalent with TokenStream::new().

source§

impl Default for BuildMetadata

source§

impl Default for Prerelease

source§

impl Default for VersionReq

The default VersionReq is the same as VersionReq::STAR.

source§

impl Default for IgnoredAny

source§

impl Default for BoundLifetimes

source§

impl Default for Generics

source§

impl Default for Abstract

source§

impl Default for Add

source§

impl Default for AddEq

source§

impl Default for And

source§

impl Default for AndAnd

source§

impl Default for AndEq

source§

impl Default for As

source§

impl Default for Async

source§

impl Default for At

source§

impl Default for Auto

source§

impl Default for Await

source§

impl Default for Bang

source§

impl Default for Become

source§

impl Default for syn::token::Box

source§

impl Default for Brace

source§

impl Default for Bracket

source§

impl Default for Break

source§

impl Default for Caret

source§

impl Default for CaretEq

source§

impl Default for Colon2

source§

impl Default for Colon

source§

impl Default for Comma

source§

impl Default for Const

source§

impl Default for Continue

source§

impl Default for Crate

source§

impl Default for Default

source§

impl Default for Div

source§

impl Default for DivEq

source§

impl Default for Do

source§

impl Default for Dollar

source§

impl Default for Dot2

source§

impl Default for Dot3

source§

impl Default for Dot

source§

impl Default for DotDotEq

source§

impl Default for Dyn

source§

impl Default for Else

source§

impl Default for Enum

source§

impl Default for Eq

source§

impl Default for EqEq

source§

impl Default for Extern

source§

impl Default for FatArrow

source§

impl Default for Final

source§

impl Default for Fn

source§

impl Default for For

source§

impl Default for Ge

source§

impl Default for Group

source§

impl Default for Gt

source§

impl Default for If

source§

impl Default for Impl

source§

impl Default for In

source§

impl Default for LArrow

source§

impl Default for Le

source§

impl Default for Let

source§

impl Default for Loop

source§

impl Default for Lt

source§

impl Default for Macro

source§

impl Default for Match

source§

impl Default for Mod

source§

impl Default for Move

source§

impl Default for MulEq

source§

impl Default for Mut

source§

impl Default for Ne

source§

impl Default for Or

source§

impl Default for OrEq

source§

impl Default for OrOr

source§

impl Default for Override

source§

impl Default for Paren

source§

impl Default for Pound

source§

impl Default for Priv

source§

impl Default for Pub

source§

impl Default for Question

source§

impl Default for RArrow

source§

impl Default for Ref

source§

impl Default for Rem

source§

impl Default for RemEq

source§

impl Default for Return

source§

impl Default for SelfType

source§

impl Default for SelfValue

source§

impl Default for Semi

source§

impl Default for Shl

source§

impl Default for ShlEq

source§

impl Default for Shr

source§

impl Default for ShrEq

source§

impl Default for Star

source§

impl Default for Static

source§

impl Default for Struct

source§

impl Default for Sub

source§

impl Default for SubEq

source§

impl Default for Super

source§

impl Default for Tilde

source§

impl Default for Trait

source§

impl Default for Try

source§

impl Default for Type

source§

impl Default for Typeof

source§

impl Default for Underscore

source§

impl Default for Union

source§

impl Default for Unsafe

source§

impl Default for Unsized

source§

impl Default for Use

source§

impl Default for Virtual

source§

impl Default for Where

source§

impl Default for While

source§

impl Default for Yield

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 EntropyRng

source§

impl Default for ThreadRng

source§

impl Default for OsRng

source§

impl Default for Global

1.28.0 · source§

impl Default for System

1.13.0 · source§

impl Default for DefaultHasher

1.7.0 · source§

impl Default for radix_engine::types::radix_engine_common::prelude::rust::hash::RandomState

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

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

1.10.0 · source§

impl Default for radix_engine::types::radix_engine_common::prelude::rust::sync::Condvar

§

impl Default for AHasher

Provides a default Hasher with fixed keys. This is typically used in conjunction with BuildHasherDefault to create [AHasher]s in order to hash the keys of the map.

Generally it is preferable to use [RandomState] instead, so that different hashmaps will have different keys. However if fixed keys are desireable this may be used instead.

§Example

use std::hash::BuildHasherDefault;
use ahash::{AHasher, RandomState};
use std::collections::HashMap;

let mut map: HashMap<i32, i32, BuildHasherDefault<AHasher>> = HashMap::default();
map.insert(12, 34);
§

impl Default for AlignedType

§

impl Default for AuthZoneParams

§

impl Default for Backoff

§

impl Default for BigEndian

§

impl Default for BlobProvider

§

impl Default for Builder

§

impl Default for Builder

§

impl Default for ByteClasses

§

impl Default for CanonicalFunctionSection

§

impl Default for ClassBytesRange

§

impl Default for ClassUnicodeRange

§

impl Default for CodeSection

§

impl Default for Collector

§

impl Default for ColoredString

§

impl Default for Component

§

impl Default for ComponentAliasSection

§

impl Default for ComponentExportSection

§

impl Default for ComponentImportSection

§

impl Default for ComponentInstanceSection

§

impl Default for ComponentNameSection

§

impl Default for ComponentType

§

impl Default for ComponentTypeSection

§

impl Default for Condvar

§

impl Default for Config

§

impl Default for Config

§

impl Default for Config

§

impl Default for Config

§

impl Default for Config

§

impl Default for Configuration

§

impl Default for ConfigurationBuilder

§

impl Default for ConstantCostRules

§

impl Default for CoreDumpSection

§

impl Default for CoreDumpStackSection

§

impl Default for CoreTypeSection

§

impl Default for DataSection

§

impl Default for DeliveryMode

§

impl Default for Eager

§

impl Default for ElementSection

§

impl Default for Engine

§

impl Default for Error

§

impl Default for ExportSection

§

impl Default for ExtractKind

§

impl Default for Extractor

§

impl Default for FuncValidatorAllocations

§

impl Default for FuncValidatorAllocations

§

impl Default for FunctionSection

§

impl Default for GlobalSection

§

impl Default for GroupInfo

§

impl Default for ImportSection

§

impl Default for IndirectNameMap

§

impl Default for InstanceSection

§

impl Default for InstanceType

§

impl Default for InvalidBufferSize

§

impl Default for InvalidOutputSize

§

impl Default for InvalidOutputSize

§

impl Default for Keccak224Core

§

impl Default for Keccak256Core

§

impl Default for Keccak256FullCore

§

impl Default for Keccak384Core

§

impl Default for Keccak512Core

§

impl Default for Lazy

§

impl Default for LinkingSection

§

impl Default for LittleEndian

§

impl Default for LookMatcher

§

impl Default for LookSet

§

impl Default for LookSet

§

impl Default for MacError

§

impl Default for ManifestBuilder

§

impl Default for ManifestIdAllocator

§

impl Default for ManifestObjectNames

§

impl Default for ManifestValidator

§

impl Default for MatchKind

§

impl Default for MemorySection

§

impl Default for MessageV1

§

impl Default for MessageValidationConfig

§

impl Default for MockBlobProvider

§

impl Default for Module

§

impl Default for ModuleInfo

§

impl Default for ModuleType

§

impl Default for NameMap

§

impl Default for NameResolver

§

impl Default for NameSection

§

impl Default for Null

§

impl Default for Once

§

impl Default for OnceBool

§

impl Default for OnceNonZeroUsize

§

impl Default for Pages

§

impl Default for Parker

§

impl Default for Parser

§

impl Default for Parser

§

impl Default for ParserBuilder

§

impl Default for ParserBuilder

§

impl Default for PatternID

§

impl Default for PreviewFlags

§

impl Default for ProducersField

§

impl Default for ProducersSection

§

impl Default for PublicKey

§

impl Default for PublicKey

§

impl Default for PublicKey

§

impl Default for RandomState

§

impl Default for RecoverableSignature

§

impl Default for RegexSet

§

impl Default for RegexSet

§

impl Default for Secp256k1<All>

§

impl Default for SecretKey

§

impl Default for SecretKey

§

impl Default for Sha3_224Core

§

impl Default for Sha3_256Core

§

impl Default for Sha3_384Core

§

impl Default for Sha3_512Core

§

impl Default for Sha224

§

impl Default for Sha256

§

impl Default for Sha384

§

impl Default for Sha512

§

impl Default for Sha512Trunc224

§

impl Default for Sha512Trunc256

§

impl Default for Shake128Core

§

impl Default for Shake256Core

§

impl Default for ShouldColorize

§

impl Default for SmallIndex

§

impl Default for SpinWait

§

impl Default for StackLimits

§

impl Default for StateID

§

impl Default for SymbolTable

§

impl Default for TableSection

§

impl Default for TagSection

§

impl Default for ThreadPool

Create a thread pool with one thread per CPU. On machines with hyperthreading, this will create one thread per hyperthread.

§

impl Default for TransactionCostingParameters

§

impl Default for TranslatorBuilder

§

impl Default for TypeSection

§

impl Default for UnparkResult

§

impl Default for UntypedValue

§

impl Default for Validator

§

impl Default for Validator

§

impl Default for WaitGroup

§

impl Default for WasmFeatures

§

impl Default for WasmFeatures

§

impl Default for WhichCaptures

§

impl Default for blst_fp

§

impl Default for blst_fp2

§

impl Default for blst_fp6

§

impl Default for blst_fp12

§

impl Default for blst_fr

§

impl Default for blst_p1

§

impl Default for blst_p1_affine

§

impl Default for blst_p2

§

impl Default for blst_p2_affine

§

impl Default for blst_pairing

§

impl Default for blst_scalar

§

impl Default for blst_uniq

§

impl Default for u5

§

impl Default for vec128_storage

§

impl Default for vec256_storage

§

impl Default for vec512_storage

source§

impl<'a> Default for TransactionReceiptDisplayContext<'a>

source§

impl<'a> Default for ManifestValueDisplayContext<'a>

source§

impl<'a> Default for ScryptoValueDisplayContext<'a>

§

impl<'a> Default for DecompilationContext<'a>

§

impl<'a> Default for ManifestDecompilationDisplayContext<'a>

§

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

1.70.0 · source§

impl<'a, K, V> Default for radix_engine::types::radix_engine_common::prelude::btree_map::Iter<'a, K, V>
where K: 'a, V: 'a,

1.70.0 · source§

impl<'a, K, V> Default for radix_engine::types::radix_engine_common::prelude::btree_map::IterMut<'a, K, V>
where K: 'a, V: 'a,

§

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

source§

impl<'m> Default for ArrayData<'m>

source§

impl<'m> Default for MapData<'m>

source§

impl<'s> Default for EnumVariantData<'s>

source§

impl<'s> Default for TupleData<'s>

source§

impl<A> Default for SystemDatabaseChecker<A>

§

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

1.70.0 · source§

impl<A, B> Default for radix_engine::types::radix_engine_common::prelude::rust::iter::Chain<A, B>
where A: Default, B: Default,

1.11.0 · source§

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

§

impl<BlockSize> Default for BlockBuffer<BlockSize>
where BlockSize: Default + ArrayLength<u8>,

§

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,

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 radix_engine::types::radix_engine_common::prelude::rust::ops::Range<Idx>
where Idx: Default,

§

impl<Idx, T> Default for Arena<Idx, T>

§

impl<Idx, T> Default for ComponentVec<Idx, T>

§

impl<Idx, T> Default for DedupArena<Idx, T>

source§

impl<K, V> Default for &radix_engine::types::radix_engine_common::prelude::indexmap::map::Slice<K, V>

source§

impl<K, V> Default for &mut radix_engine::types::radix_engine_common::prelude::indexmap::map::Slice<K, V>

source§

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

source§

impl<K, V> Default for radix_engine::types::Box<Slice<K, V>>

source§

impl<K, V> Default for KeyValueStoreInit<K, V>
where K: Hash + Eq + PartialEq,

§

impl<K, V> Default for NonIterMap<K, V>
where K: Hash + Eq,

1.70.0 · source§

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

1.70.0 · source§

impl<K, V> Default for radix_engine::types::radix_engine_common::prelude::btree_map::Range<'_, K, V>

1.70.0 · source§

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

§

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 CacheBuilder<K, V, Cache<K, V>>
where K: Eq + Hash,

§

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

1.70.0 · source§

impl<K, V, A> Default for radix_engine::types::radix_engine_common::prelude::btree_map::IntoIter<K, V, A>
where A: Allocator + Default + Clone,

1.70.0 · source§

impl<K, V, A> Default for IntoKeys<K, V, A>
where A: Allocator + Default + Clone,

1.70.0 · source§

impl<K, V, A> Default for IntoValues<K, V, A>
where A: Allocator + Default + Clone,

source§

impl<K, V, S> Default for radix_engine::types::radix_engine_common::prelude::hash_map::ext_HashMap<K, V, S>
where S: Default,

source§

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

source§

impl<K, V, S> Default for radix_engine::types::radix_engine_common::prelude::indexmap::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 + Clone,

§

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

§

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 VersionedSchema<S>
where S: CustomSchema,

source§

impl<S> Default for SchemaV1<S>
where S: CustomSchema,

source§

impl<T> Default for &[T]

source§

impl<T> Default for &radix_engine::types::radix_engine_common::prelude::indexmap::set::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 Vec<T>

source§

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

source§

impl<T> Default for BTreeSet<T>

source§

impl<T> Default for radix_engine::types::Box<[T]>

source§

impl<T> Default for radix_engine::types::Box<Slice<T>>

source§

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

source§

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

source§

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

source§

impl<T> Default for LinkedList<T>

source§

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

1.70.0 · source§

impl<T> Default for radix_engine::types::OnceCell<T>

source§

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

source§

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

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,

source§

impl<T> Default for VecDeque<T>

1.70.0 · source§

impl<T> Default for radix_engine::types::radix_engine_common::prelude::btree_set::Iter<'_, T>

1.70.0 · source§

impl<T> Default for radix_engine::types::radix_engine_common::prelude::btree_set::Range<'_, T>

source§

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

1.70.0 · source§

impl<T> Default for alloc::collections::binary_heap::IntoIter<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>

1.62.0 · source§

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

source§

impl<T> Default for Cursor<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 radix_engine::types::radix_engine_common::prelude::rust::iter::Empty<T>

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.10.0 · source§

impl<T> Default for radix_engine::types::radix_engine_common::prelude::rust::rc::Weak<T>

1.70.0 · source§

impl<T> Default for radix_engine::types::radix_engine_common::prelude::rust::slice::Iter<'_, T>

1.70.0 · source§

impl<T> Default for radix_engine::types::radix_engine_common::prelude::rust::slice::IterMut<'_, T>

source§

impl<T> Default for AtomicPtr<T>

source§

impl<T> Default for radix_engine::types::radix_engine_common::prelude::rust::sync::Arc<T>
where T: Default,

source§

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

source§

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

1.10.0 · source§

impl<T> Default for radix_engine::types::radix_engine_common::prelude::rust::sync::Mutex<T>
where T: Default + ?Sized,

1.70.0 · source§

impl<T> Default for OnceLock<T>

1.10.0 · source§

impl<T> Default for radix_engine::types::radix_engine_common::prelude::rust::sync::RwLock<T>
where T: Default,

1.10.0 · source§

impl<T> Default for radix_engine::types::radix_engine_common::prelude::rust::sync::Weak<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 IndexSet<T>

§

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

§

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

§

impl<T> Default for Linker<T>

§

impl<T> Default for OnceBox<T>

§

impl<T> Default for OnceCell<T>

§

impl<T> Default for OnceCell<T>

§

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

§

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

§

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 radix_engine::types::radix_engine_common::prelude::btree_set::IntoIter<T, A>
where A: Allocator + Default + Clone,

1.70.0 · source§

impl<T, A> Default for radix_engine::types::radix_engine_common::prelude::vec::IntoIter<T, A>
where A: Allocator + Default,

§

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

§

impl<T, A> Default for RawTable<T, A>
where A: Allocator + Clone + 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,

source§

impl<T, P> Default for Punctuated<T, P>

§

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

§

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

§

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

source§

impl<T, S> Default for radix_engine::types::radix_engine_common::prelude::hash_set::ext_HashSet<T, S>
where S: Default,

source§

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

source§

impl<T, S> Default for radix_engine::types::radix_engine_common::prelude::indexmap::IndexSet<T, S>
where S: Default,

§

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

§

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

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>

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,

source§

impl<V> Default for KeyValueEntrySubstate<V>

source§

impl<W: WasmEngine + Default> Default for ScryptoVm<W>

§

impl<const N: usize> Default for BInt<N>

§

impl<const N: usize> Default for BIntD8<N>

§

impl<const N: usize> Default for BIntD16<N>

§

impl<const N: usize> Default for BIntD32<N>

§

impl<const N: usize> Default for BUint<N>

§

impl<const N: usize> Default for BUintD8<N>

§

impl<const N: usize> Default for BUintD16<N>

§

impl<const N: usize> Default for BUintD32<N>