Trait wasmtime_wiggle::bitflags::_core::prelude::rust_2021::Default1.0.0[][src]

pub trait Default {
    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.

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

fn default() -> Self[src]

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 }
}

Implementations on Foreign Types

impl Default for Box<OsStr, Global>[src]

pub fn default() -> Box<OsStr, Global>

Notable traits for Box<I, A>

impl<I, A> Iterator for Box<I, A> where
    A: Allocator,
    I: Iterator + ?Sized
type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
    A: Allocator + 'static,
    F: Future + Unpin + ?Sized
type Output = <F as Future>::Output;
[src]

impl<T, S> Default for HashSet<T, S> where
    S: Default
[src]

pub fn default() -> HashSet<T, S>[src]

Creates an empty HashSet<T, S> with the Default value for the hasher.

impl<'_> Default for &'_ CStr[src]

pub fn default() -> &'_ CStr[src]

impl Default for CString[src]

pub fn default() -> CString[src]

Creates an empty CString.

impl<T> Default for Cursor<T> where
    T: Default
[src]

pub fn default() -> Cursor<T>[src]

impl Default for System[src]

pub fn default() -> System[src]

impl Default for Condvar[src]

pub fn default() -> Condvar[src]

Creates a Condvar which is ready to be waited on and notified.

impl<T> Default for SyncLazy<T, fn() -> T> where
    T: Default
[src]

pub fn default() -> SyncLazy<T, fn() -> T>[src]

Creates a new lazy value using Default as the initializing function.

impl<T> Default for Mutex<T> where
    T: Default + ?Sized
[src]

pub fn default() -> Mutex<T>[src]

Creates a Mutex<T>, with the Default value for T.

impl<'_> Default for &'_ OsStr[src]

pub fn default() -> &'_ OsStr[src]

Creates an empty OsStr.

impl<T> Default for RwLock<T> where
    T: Default
[src]

pub fn default() -> RwLock<T>[src]

Creates a new RwLock<T>, with the Default value for T.

impl<T> Default for SyncOnceCell<T>[src]

pub fn default() -> SyncOnceCell<T>[src]

impl Default for RandomState[src]

pub fn default() -> RandomState[src]

Constructs a new RandomState.

impl<K, V, S> Default for HashMap<K, V, S> where
    S: Default
[src]

pub fn default() -> HashMap<K, V, S>[src]

Creates an empty HashMap<K, V, S>, with the Default value for the hasher.

impl Default for PathBuf[src]

pub fn default() -> PathBuf[src]

impl Default for OsString[src]

pub fn default() -> OsString[src]

Constructs an empty OsString.

impl Default for DefaultHasher[src]

pub fn default() -> DefaultHasher[src]

Creates a new DefaultHasher using new. See its documentation for more.

impl Default for Box<CStr, Global>[src]

pub fn default() -> Box<CStr, Global>

Notable traits for Box<I, A>

impl<I, A> Iterator for Box<I, A> where
    A: Allocator,
    I: Iterator + ?Sized
type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
    A: Allocator + 'static,
    F: Future + Unpin + ?Sized
type Output = <F as Future>::Output;
[src]

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

pub fn default() -> [T; 10][src]

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

pub fn default() -> [T; 20][src]

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

pub fn default() -> [T; 3][src]

impl Default for f64[src]

pub fn default() -> f64[src]

Returns the default value of 0.0

impl<A, B, C, D, E, F, G, H, I, J> Default for (A, B, C, D, E, F, G, H, I, J) where
    C: Default,
    E: Default,
    A: Default,
    B: Default,
    F: Default,
    I: Default,
    G: Default,
    D: Default,
    H: Default,
    J: Default
[src]

pub fn default() -> (A, B, C, D, E, F, G, H, I, J)[src]

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

pub fn default() -> [T; 25][src]

impl<'_> Default for &'_ mut str[src]

pub fn default() -> &'_ mut str[src]

Creates an empty mutable str

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

pub fn default() -> [T; 8][src]

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

pub fn default() -> [T; 16][src]

impl Default for f32[src]

pub fn default() -> f32[src]

Returns the default value of 0.0

impl Default for i32[src]

pub fn default() -> i32[src]

Returns the default value of 0

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

pub fn default() -> [T; 9][src]

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

pub fn default() -> [T; 29][src]

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

pub fn default() -> [T; 30][src]

impl Default for isize[src]

pub fn default() -> isize[src]

Returns the default value of 0

impl<A, B, C> Default for (A, B, C) where
    C: Default,
    A: Default,
    B: Default
[src]

pub fn default() -> (A, B, C)[src]

impl Default for char[src]

pub fn default() -> char[src]

Returns the default value of \x00

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

pub fn default() -> [T; 32][src]

impl<'_, T> Default for &'_ mut [T][src]

pub fn default() -> &'_ mut [T]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

Creates a mutable empty slice.

impl<A, B, C, D, E, F, G> Default for (A, B, C, D, E, F, G) where
    C: Default,
    E: Default,
    A: Default,
    B: Default,
    F: Default,
    G: Default,
    D: Default
[src]

pub fn default() -> (A, B, C, D, E, F, G)[src]

impl Default for u16[src]

pub fn default() -> u16[src]

Returns the default value of 0

impl Default for usize[src]

pub fn default() -> usize[src]

Returns the default value of 0

impl Default for u8[src]

pub fn default() -> u8[src]

Returns the default value of 0

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

pub fn default() -> [T; 5][src]

impl<A, B, C, D, E, F, G, H> Default for (A, B, C, D, E, F, G, H) where
    C: Default,
    E: Default,
    A: Default,
    B: Default,
    F: Default,
    G: Default,
    D: Default,
    H: Default
[src]

pub fn default() -> (A, B, C, D, E, F, G, H)[src]

impl<A, B, C, D, E> Default for (A, B, C, D, E) where
    C: Default,
    E: Default,
    A: Default,
    B: Default,
    D: Default
[src]

pub fn default() -> (A, B, C, D, E)[src]

impl Default for u32[src]

pub fn default() -> u32[src]

Returns the default value of 0

impl<A, B, C, D, E, F, G, H, I> Default for (A, B, C, D, E, F, G, H, I) where
    C: Default,
    E: Default,
    A: Default,
    B: Default,
    F: Default,
    I: Default,
    G: Default,
    D: Default,
    H: Default
[src]

pub fn default() -> (A, B, C, D, E, F, G, H, I)[src]

impl Default for bool[src]

pub fn default() -> bool[src]

Returns the default value of false

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

pub fn default() -> [T; 24][src]

impl<A, B, C, D, E, F, G, H, I, J, K, L> Default for (A, B, C, D, E, F, G, H, I, J, K, L) where
    C: Default,
    E: Default,
    A: Default,
    B: Default,
    F: Default,
    K: Default,
    I: Default,
    G: Default,
    D: Default,
    H: Default,
    J: Default,
    L: Default
[src]

pub fn default() -> (A, B, C, D, E, F, G, H, I, J, K, L)[src]

impl Default for u64[src]

pub fn default() -> u64[src]

Returns the default value of 0

impl<A, B, C, D> Default for (A, B, C, D) where
    C: Default,
    A: Default,
    B: Default,
    D: Default
[src]

pub fn default() -> (A, B, C, D)[src]

impl<A, B> Default for (A, B) where
    A: Default,
    B: Default
[src]

pub fn default() -> (A, B)[src]

impl Default for u128[src]

pub fn default() -> u128[src]

Returns the default value of 0

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

pub fn default() -> [T; 17][src]

impl Default for i8[src]

pub fn default() -> i8[src]

Returns the default value of 0

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

pub fn default() -> [T; 15][src]

impl<A, B, C, D, E, F, G, H, I, J, K> Default for (A, B, C, D, E, F, G, H, I, J, K) where
    C: Default,
    E: Default,
    A: Default,
    B: Default,
    F: Default,
    K: Default,
    I: Default,
    G: Default,
    D: Default,
    H: Default,
    J: Default
[src]

pub fn default() -> (A, B, C, D, E, F, G, H, I, J, K)[src]

impl Default for i16[src]

pub fn default() -> i16[src]

Returns the default value of 0

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

pub fn default() -> [T; 18][src]

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

pub fn default() -> [T; 2][src]

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

pub fn default() -> [T; 4][src]

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

pub fn default() -> [T; 27][src]

impl Default for i128[src]

pub fn default() -> i128[src]

Returns the default value of 0

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

pub fn default() -> [T; 23][src]

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

pub fn default() -> [T; 22][src]

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

pub fn default() -> [T; 6][src]

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

pub fn default() -> [T; 13][src]

impl Default for ()[src]

pub fn default()[src]

Returns the default value of ()

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

pub fn default() -> [T; 19][src]

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

pub fn default() -> [T; 1][src]

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

pub fn default() -> [T; 26][src]

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

pub fn default() -> [T; 7][src]

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

pub fn default() -> [T; 31][src]

impl<'_> Default for &'_ str[src]

pub fn default() -> &'_ str[src]

Creates an empty str

impl<A> Default for (A,) where
    A: Default
[src]

pub fn default() -> (A,)[src]

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

pub fn default() -> [T; 28][src]

impl<T> Default for [T; 0][src]

pub fn default() -> [T; 0][src]

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

pub fn default() -> [T; 14][src]

impl<A, B, C, D, E, F> Default for (A, B, C, D, E, F) where
    C: Default,
    E: Default,
    A: Default,
    B: Default,
    F: Default,
    D: Default
[src]

pub fn default() -> (A, B, C, D, E, F)[src]

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

pub fn default() -> [T; 21][src]

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

pub fn default() -> [T; 12][src]

impl Default for i64[src]

pub fn default() -> i64[src]

Returns the default value of 0

impl<'_, T> Default for &'_ [T][src]

pub fn default() -> &'_ [T]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

Creates an empty slice.

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

pub fn default() -> [T; 11][src]

impl Default for Global[src]

pub fn default() -> Global[src]

impl<T> Default for Arc<T> where
    T: Default
[src]

pub fn default() -> Arc<T>[src]

Creates a new Arc<T>, with the Default value for T.

Examples

use std::sync::Arc;

let x: Arc<i32> = Default::default();
assert_eq!(*x, 0);

impl<T> Default for BTreeSet<T> where
    T: Ord
[src]

pub fn default() -> BTreeSet<T>[src]

Creates an empty BTreeSet.

impl<T> Default for Rc<T> where
    T: Default
[src]

pub fn default() -> Rc<T>[src]

Creates a new Rc<T>, with the Default value for T.

Examples

use std::rc::Rc;

let x: Rc<i32> = Default::default();
assert_eq!(*x, 0);

impl<K, V> Default for BTreeMap<K, V> where
    K: Ord
[src]

pub fn default() -> BTreeMap<K, V>[src]

Creates an empty BTreeMap.

impl<T> Default for Weak<T>[src]

pub fn default() -> Weak<T>[src]

Constructs a new Weak<T>, without allocating any memory. Calling upgrade on the return value always gives None.

Examples

use std::rc::Weak;

let empty: Weak<i64> = Default::default();
assert!(empty.upgrade().is_none());

impl<T> Default for VecDeque<T>[src]

pub fn default() -> VecDeque<T>[src]

Creates an empty VecDeque<T>.

impl Default for String[src]

pub fn default() -> String[src]

Creates an empty String.

impl Default for Box<str, Global>[src]

pub fn default() -> Box<str, Global>

Notable traits for Box<I, A>

impl<I, A> Iterator for Box<I, A> where
    A: Allocator,
    I: Iterator + ?Sized
type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
    A: Allocator + 'static,
    F: Future + Unpin + ?Sized
type Output = <F as Future>::Output;
[src]

impl<T> Default for Box<T, Global> where
    T: Default
[src]

pub fn default() -> Box<T, Global>

Notable traits for Box<I, A>

impl<I, A> Iterator for Box<I, A> where
    A: Allocator,
    I: Iterator + ?Sized
type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
    A: Allocator + 'static,
    F: Future + Unpin + ?Sized
type Output = <F as Future>::Output;
[src]

Creates a Box<T>, with the Default value for T.

impl<T> Default for Box<[T], Global>[src]

pub fn default() -> Box<[T], Global>

Notable traits for Box<I, A>

impl<I, A> Iterator for Box<I, A> where
    A: Allocator,
    I: Iterator + ?Sized
type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
    A: Allocator + 'static,
    F: Future + Unpin + ?Sized
type Output = <F as Future>::Output;
[src]

impl<T> Default for LinkedList<T>[src]

pub fn default() -> LinkedList<T>[src]

Creates an empty LinkedList<T>.

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

pub fn default() -> Cow<'_, B>[src]

Creates an owned Cow<’a, B> with the default value for the contained owned value.

impl<T> Default for Weak<T>[src]

pub fn default() -> Weak<T>[src]

Constructs a new Weak<T>, without allocating memory. Calling upgrade on the return value always gives None.

Examples

use std::sync::Weak;

let empty: Weak<i64> = Default::default();
assert!(empty.upgrade().is_none());

impl<T> Default for Vec<T, Global>[src]

pub fn default() -> Vec<T, Global>[src]

Creates an empty Vec<T>.

impl<T> Default for BinaryHeap<T> where
    T: Ord
[src]

pub fn default() -> BinaryHeap<T>[src]

Creates an empty BinaryHeap<T>.

impl<'_> Default for Chain<'_>[src]

pub fn default() -> Chain<'_>

Notable traits for Chain<'a>

impl<'a> Iterator for Chain<'a> type Item = &'a (dyn Error + 'static);
[src]

impl Default for InstanceLimits[src]

impl Default for Engine[src]

pub fn default() -> Engine[src]

impl Default for Config[src]

pub fn default() -> Config[src]

impl Default for ModuleLimits[src]

impl Default for StoreLimits[src]

impl Default for InstanceAllocationStrategy[src]

impl Default for Store[src]

pub fn default() -> Store[src]

impl Default for PoolingAllocationStrategy[src]

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

pub fn default() -> SmallVec<A>

impl Default for Tunables

pub fn default() -> Tunables

impl Default for InstanceSignature

pub fn default() -> InstanceSignature

impl Default for FunctionAddressMap

pub fn default() -> FunctionAddressMap

impl Default for CompiledFunction

pub fn default() -> CompiledFunction

impl Default for TypeTables

pub fn default() -> TypeTables

impl<'a> Default for DebugInfoData<'a>

pub fn default() -> DebugInfoData<'a>

impl Default for WasmFileInfo

pub fn default() -> WasmFileInfo

impl<'a> Default for NameSection<'a>

pub fn default() -> NameSection<'a>

impl Default for MemoryInitialization

pub fn default() -> MemoryInitialization

impl<'data> Default for ModuleTranslation<'data>

pub fn default() -> ModuleTranslation<'data>

impl Default for Module

pub fn default() -> Module

impl<'a> Default for DisplayFunctionAnnotations<'a>

pub fn default() -> DisplayFunctionAnnotations<'a>

impl Default for ArgumentLoc

pub fn default() -> ArgumentLoc

impl Default for Type

pub fn default() -> Type

impl Default for NullRelocSink

pub fn default() -> NullRelocSink

impl Default for ExternalName

pub fn default() -> ExternalName

impl Default for Register

pub fn default() -> Register

impl Default for BackendVariant

pub fn default() -> BackendVariant

impl Default for StackSlots

pub fn default() -> StackSlots

impl Default for OpcodeMap

pub fn default() -> OpcodeMap

impl Default for LegacyPrefixes

pub fn default() -> LegacyPrefixes

impl Default for PassTimes

pub fn default() -> PassTimes

impl Default for ConstantData

pub fn default() -> ConstantData

impl Default for EvexInstruction

Because some of the bit flags in the EVEX prefix are reversed and users of EvexInstruction may choose to skip setting fields, here we set some sane defaults. Note that:

  • the first byte is always 0x62 but you will notice it at the end of the default bits value implemented–remember the little-endian order
  • some bits are always set to certain values: bits 10-11 to 0, bit 18 to 1
  • the other bits set correspond to reversed bits: R, X, B, R’ (byte 1), vvvv (byte 2), V’ (byte 3).

See the default_emission test for what these defaults are equivalent to (e.g. using RAX, unsetting the W bit, etc.)

pub fn default() -> EvexInstruction

impl Default for EvexContext

pub fn default() -> EvexContext

impl Default for ValueLoc

pub fn default() -> ValueLoc

impl Default for Encoding

The default encoding is the illegal one.

pub fn default() -> Encoding

impl Default for EvexVectorLength

pub fn default() -> EvexVectorLength

impl Default for VCodeConstants

pub fn default() -> VCodeConstants

impl Default for SourceLoc

pub fn default() -> SourceLoc

impl Default for VerifierErrors

pub fn default() -> VerifierErrors

impl Default for NullTrapSink

pub fn default() -> NullTrapSink

impl Default for MachLabel

pub fn default() -> MachLabel

impl Default for VariableArgs

pub fn default() -> VariableArgs

impl Default for EvexMasking

pub fn default() -> EvexMasking

impl<K, V> Default for Map<K, V> where
    K: Copy,
    V: Copy

pub fn default() -> Map<K, V>

impl<K> Default for Set<K> where
    K: Copy

pub fn default() -> Set<K>

impl<K, V> Default for PrimaryMap<K, V> where
    K: EntityRef, 

pub fn default() -> PrimaryMap<K, V>

impl<K, V> Default for SecondaryMap<K, V> where
    K: EntityRef,
    V: Clone + Default

pub fn default() -> SecondaryMap<K, V>

impl<T> Default for EntityList<T> where
    T: EntityRef + ReservedValue, 

Create an empty list.

pub fn default() -> EntityList<T>

impl<T> Default for PackedOption<T> where
    T: ReservedValue, 

pub fn default() -> PackedOption<T>

Create a default packed option representing None.

impl Default for IgnoredAny[src]

impl Default for DefaultToHost

pub fn default() -> DefaultToHost

impl Default for DefaultToUnknown

pub fn default() -> DefaultToUnknown

impl<R> Default for DebugLineStr<R> where
    R: Default

pub fn default() -> DebugLineStr<R>

impl<R> Default for DebugLine<R> where
    R: Default

pub fn default() -> DebugLine<R>

impl Default for FileInfo

pub fn default() -> FileInfo

impl Default for RangeListTable

pub fn default() -> RangeListTable

impl<R> Default for DebugTypes<R> where
    R: Default

pub fn default() -> DebugTypes<R>

impl<R> Default for DebugInfo<R> where
    R: Default

pub fn default() -> DebugInfo<R>

impl<R> Default for DebugLocLists<R> where
    R: Default

pub fn default() -> DebugLocLists<R>

impl Default for BigEndian

pub fn default() -> BigEndian

impl Default for DebugInfoOffsets

pub fn default() -> DebugInfoOffsets

impl Default for BaseAddresses

pub fn default() -> BaseAddresses

impl<R> Default for DebugAbbrev<R> where
    R: Default

pub fn default() -> DebugAbbrev<R>

impl Default for Pointer

pub fn default() -> Pointer

impl<W> Default for DebugStr<W> where
    W: Default + Writer, 

pub fn default() -> DebugStr<W>

impl<W> Default for DebugInfo<W> where
    W: Default + Writer, 

pub fn default() -> DebugInfo<W>

impl Default for Augmentation

pub fn default() -> Augmentation

impl<W> Default for DebugRanges<W> where
    W: Default + Writer, 

pub fn default() -> DebugRanges<W>

impl<W> Default for DebugLocLists<W> where
    W: Default + Writer, 

pub fn default() -> DebugLocLists<W>

impl<R> Default for DebugStr<R> where
    R: Default

pub fn default() -> DebugStr<R>

impl Default for LineStringTable

pub fn default() -> LineStringTable

impl<R> Default for DebugRngLists<R> where
    R: Default

pub fn default() -> DebugRngLists<R>

impl<W> Default for DebugRngLists<W> where
    W: Default + Writer, 

pub fn default() -> DebugRngLists<W>

impl<R> Default for RangeIter<R> where
    R: Reader, 

pub fn default() -> RangeIter<R>

impl Default for UnitTable

pub fn default() -> UnitTable

impl Default for LineEncoding

pub fn default() -> LineEncoding

impl<W> Default for DebugLine<W> where
    W: Default + Writer, 

pub fn default() -> DebugLine<W>

impl<'input, Endian> Default for EndianSlice<'input, Endian> where
    Endian: Default + Endianity, 

pub fn default() -> EndianSlice<'input, Endian>

impl<R> Default for DebugLoc<R> where
    R: Default

pub fn default() -> DebugLoc<R>

impl Default for DwarfFileType

pub fn default() -> DwarfFileType

impl<W> Default for DebugFrame<W> where
    W: Default + Writer, 

pub fn default() -> DebugFrame<W>

impl<R> Default for DebugStrOffsets<R> where
    R: Default

pub fn default() -> DebugStrOffsets<R>

impl<R> Default for CfaRule<R> where
    R: Reader, 

pub fn default() -> CfaRule<R>

impl<R> Default for RangeLists<R> where
    R: Default

pub fn default() -> RangeLists<R>

impl<R> Default for LocationLists<R> where
    R: Default

pub fn default() -> LocationLists<R>

impl<R> Default for UnwindTableRow<R> where
    R: Reader, 

pub fn default() -> UnwindTableRow<R>

impl Default for SectionBaseAddresses

pub fn default() -> SectionBaseAddresses

impl<R> Default for DebugRanges<R> where
    R: Default

pub fn default() -> DebugRanges<R>

impl<W> Default for DebugAbbrev<W> where
    W: Default + Writer, 

pub fn default() -> DebugAbbrev<W>

impl Default for Dwarf

pub fn default() -> Dwarf

impl<W> Default for Sections<W> where
    W: Default + Writer, 

pub fn default() -> Sections<W>

impl Default for FrameTable

pub fn default() -> FrameTable

impl<R> Default for Dwarf<R> where
    R: Default

pub fn default() -> Dwarf<R>

impl Default for LocationListTable

pub fn default() -> LocationListTable

impl<W> Default for EhFrame<W> where
    W: Default + Writer, 

pub fn default() -> EhFrame<W>

impl Default for RunTimeEndian

pub fn default() -> RunTimeEndian

impl<R> Default for UninitializedUnwindContext<R> where
    R: Reader, 

pub fn default() -> UninitializedUnwindContext<R>

impl Default for StringTable

pub fn default() -> StringTable

impl Default for Expression

pub fn default() -> Expression

impl<R> Default for DebugAranges<R> where
    R: Default

pub fn default() -> DebugAranges<R>

impl<W> Default for DebugLoc<W> where
    W: Default + Writer, 

pub fn default() -> DebugLoc<W>

impl<W> Default for DebugLineStr<W> where
    W: Default + Writer, 

pub fn default() -> DebugLineStr<W>

impl Default for LittleEndian

pub fn default() -> LittleEndian

impl<R> Default for DebugAddr<R> where
    R: Default

pub fn default() -> DebugAddr<R>

impl Default for Abbreviations

pub fn default() -> Abbreviations

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

pub fn default() -> IndexMap<K, V, S>[src]

Return an empty IndexMap

impl<T, S> Default for IndexSet<T, S> where
    S: Default
[src]

pub fn default() -> IndexSet<T, S>[src]

Return an empty IndexSet

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

pub fn default() -> HashSet<T, S>

Creates an empty HashSet<T, S> with the Default value for the hasher.

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

pub fn default() -> HashMap<K, V, S>

Creates an empty HashMap<K, V, S>, with the Default value for the hasher.

impl Default for LinearScanOptions

pub fn default() -> LinearScanOptions

impl Default for BacktrackingOptions

pub fn default() -> BacktrackingOptions

impl Default for Options

pub fn default() -> Options

impl Default for FxHasher

pub fn default() -> FxHasher

impl Default for Switch

pub fn default() -> Switch

impl Default for Parser

pub fn default() -> Parser

impl Default for WasmFeatures

pub fn default() -> WasmFeatures

impl Default for Validator

pub fn default() -> Validator

impl<'a> Default for Imports<'a>

pub fn default() -> Imports<'a>

impl Default for VMSharedSignatureIndex

pub fn default() -> VMSharedSignatureIndex

impl Default for PoolingAllocationStrategy

pub fn default() -> PoolingAllocationStrategy

impl Default for InstanceLimits

pub fn default() -> InstanceLimits

impl Default for Memory

pub fn default() -> Memory

impl Default for ModuleLimits

pub fn default() -> ModuleLimits

impl Default for OnDemandInstanceAllocator

pub fn default() -> OnDemandInstanceAllocator

impl Default for Table

pub fn default() -> Table

impl Default for VMInterrupts

pub fn default() -> VMInterrupts

impl Default for ThreadRng[src]

impl Default for OsRng[src]

pub fn default() -> OsRng[src]

impl Default for vec128_storage

pub fn default() -> vec128_storage

impl Default for vec256_storage

pub fn default() -> vec256_storage

impl Default for vec512_storage

pub fn default() -> vec512_storage

impl Default for Backtrace[src]

impl<'data> Default for ObjectMapEntry<'data>

pub fn default() -> ObjectMapEntry<'data>

impl<'data> Default for SectionTable<'data>

pub fn default() -> SectionTable<'data>

impl Default for Endianness

pub fn default() -> Endianness

impl<'data> Default for StringTable<'data>

pub fn default() -> StringTable<'data>

impl<E> Default for CompressionHeader64<E> where
    E: Default + Endian, 

pub fn default() -> CompressionHeader64<E>

impl<'data, Elf> Default for SymbolTable<'data, Elf> where
    Elf: FileHeader, 

pub fn default() -> SymbolTable<'data, Elf>

impl<E> Default for U64Bytes<E> where
    E: Default + Endian, 

pub fn default() -> U64Bytes<E>

impl Default for LittleEndian

pub fn default() -> LittleEndian

impl<E> Default for I32Bytes<E> where
    E: Default + Endian, 

pub fn default() -> I32Bytes<E>

impl Default for BigEndian

pub fn default() -> BigEndian

impl<T> Default for SymbolMap<T> where
    T: Default + SymbolMapEntry, 

pub fn default() -> SymbolMap<T>

impl<E> Default for U16Bytes<E> where
    E: Default + Endian, 

pub fn default() -> U16Bytes<E>

impl<E> Default for I64Bytes<E> where
    E: Default + Endian, 

pub fn default() -> I64Bytes<E>

impl<'data> Default for ObjectMap<'data>

pub fn default() -> ObjectMap<'data>

impl<'data, Mach> Default for SymbolTable<'data, Mach> where
    Mach: MachHeader, 

pub fn default() -> SymbolTable<'data, Mach>

impl<'data, Elf> Default for SectionTable<'data, Elf> where
    Elf: Default + FileHeader,
    <Elf as FileHeader>::SectionHeader: Default

pub fn default() -> SectionTable<'data, Elf>

impl<E> Default for U32Bytes<E> where
    E: Default + Endian, 

pub fn default() -> U32Bytes<E>

impl<E> Default for I16Bytes<E> where
    E: Default + Endian, 

pub fn default() -> I16Bytes<E>

impl<'data> Default for Bytes<'data>

pub fn default() -> Bytes<'data>

impl<'data, E> Default for LoadCommandIterator<'data, E> where
    E: Default + Endian, 

pub fn default() -> LoadCommandIterator<'data, E>

impl<E> Default for CompressionHeader32<E> where
    E: Default + Endian, 

pub fn default() -> CompressionHeader32<E>

impl Default for Hasher

pub fn default() -> Hasher

impl Default for DecompressorOxide

pub fn default() -> DecompressorOxide

Create a new tinfl_decompressor with all fields set to 0.

impl Default for InflateState

pub fn default() -> InflateState

impl Default for CompressorOxide

pub fn default() -> CompressorOxide

Initialize the compressor with a level of 4, zlib wrapper and the default strategy.

impl Default for Adler32[src]

pub fn default() -> Adler32[src]

impl Default for TrampolineRelocSink

pub fn default() -> TrampolineRelocSink

impl Default for NullProfilerAgent

pub fn default() -> NullProfilerAgent

impl Default for Cranelift

pub fn default() -> Cranelift

impl Default for DefaultOptions[src]

impl Default for CvQualifiers

pub fn default() -> CvQualifiers

impl Default for ParseOptions

pub fn default() -> ParseOptions

impl Default for DemangleOptions

pub fn default() -> DemangleOptions

Implementors

impl Default for Dispatch[src]

pub fn default() -> Dispatch[src]

Returns the current default dispatcher

impl Default for Error[src]

pub fn default() -> Error[src]

impl Default for SipHasher[src]

impl Default for PhantomPinned1.33.0[src]

impl Default for RangeFull[src]

impl Default for AtomicBool[src]

pub fn default() -> AtomicBool[src]

Creates an AtomicBool initialized to false.

impl Default for AtomicI81.34.0[src]

impl Default for AtomicI161.34.0[src]

impl Default for AtomicI321.34.0[src]

impl Default for AtomicI641.34.0[src]

impl Default for AtomicIsize[src]

impl Default for AtomicU81.34.0[src]

impl Default for AtomicU161.34.0[src]

impl Default for AtomicU321.34.0[src]

impl Default for AtomicU641.34.0[src]

impl Default for AtomicUsize[src]

impl Default for Duration1.3.0[src]

impl<'a> Default for CommentSyntax<'a>[src]

pub fn default() -> CommentSyntax<'a>[src]

impl<'a, T> Default for Documented<'a, T> where
    T: Default
[src]

pub fn default() -> Documented<'a, T>[src]

impl<H> Default for BuildHasherDefault<H>1.7.0[src]

impl<Idx> Default for Range<Idx> where
    Idx: Default
[src]

pub fn default() -> Range<Idx>

Notable traits for Range<A>

impl<A> Iterator for Range<A> where
    A: Step
type Item = A;
[src]

impl<T> Default for Option<T>[src]

pub fn default() -> Option<T>[src]

Returns None.

Examples

let opt: Option<u32> = Option::default();
assert!(opt.is_none());

impl<T> Default for Cell<T> where
    T: Default
[src]

pub fn default() -> Cell<T>[src]

Creates a Cell<T>, with the Default value for T.

impl<T> Default for RefCell<T> where
    T: Default
[src]

pub fn default() -> RefCell<T>[src]

Creates a RefCell<T>, with the Default value for T.

impl<T> Default for UnsafeCell<T> where
    T: Default
1.10.0[src]

pub fn default() -> UnsafeCell<T>[src]

Creates an UnsafeCell, with the Default value for T.

impl<T> Default for Reverse<T> where
    T: Default
1.19.0[src]

pub fn default() -> Reverse<T>[src]

impl<T> Default for Empty<T>1.2.0[src]

pub fn default() -> Empty<T>

Notable traits for Empty<T>

impl<T> Iterator for Empty<T> type Item = T;
[src]

impl<T> Default for Lazy<T, fn() -> T> where
    T: Default
[src]

pub fn default() -> Lazy<T, fn() -> T>[src]

Creates a new lazy value using Default as the initializing function.

impl<T> Default for OnceCell<T>[src]

pub fn default() -> OnceCell<T>[src]

impl<T> Default for PhantomData<T> where
    T: ?Sized
[src]

pub fn default() -> PhantomData<T>[src]

impl<T> Default for ManuallyDrop<T> where
    T: Default + ?Sized
1.20.0[src]

pub fn default() -> ManuallyDrop<T>[src]

impl<T> Default for Wrapping<T> where
    T: Default
[src]

pub fn default() -> Wrapping<T>[src]

impl<T> Default for AtomicPtr<T>[src]

pub fn default() -> AtomicPtr<T>[src]

Creates a null AtomicPtr<T>.