Enum Opcode

Source
#[repr(u8)]
pub enum Opcode {
Show 185 variants Jump = 1, Brif = 2, BrTable = 3, Debugtrap = 4, Trap = 5, Trapz = 6, Trapnz = 7, Return = 8, Call = 9, CallIndirect = 10, ReturnCall = 11, ReturnCallIndirect = 12, FuncAddr = 13, TryCall = 14, TryCallIndirect = 15, Splat = 16, Swizzle = 17, X86Pshufb = 18, Insertlane = 19, Extractlane = 20, Smin = 21, Umin = 22, Smax = 23, Umax = 24, AvgRound = 25, UaddSat = 26, SaddSat = 27, UsubSat = 28, SsubSat = 29, Load = 30, Store = 31, Uload8 = 32, Sload8 = 33, Istore8 = 34, Uload16 = 35, Sload16 = 36, Istore16 = 37, Uload32 = 38, Sload32 = 39, Istore32 = 40, StackSwitch = 41, Uload8x8 = 42, Sload8x8 = 43, Uload16x4 = 44, Sload16x4 = 45, Uload32x2 = 46, Sload32x2 = 47, StackLoad = 48, StackStore = 49, StackAddr = 50, DynamicStackLoad = 51, DynamicStackStore = 52, DynamicStackAddr = 53, GlobalValue = 54, SymbolValue = 55, TlsValue = 56, GetPinnedReg = 57, SetPinnedReg = 58, GetFramePointer = 59, GetStackPointer = 60, GetReturnAddress = 61, Iconst = 62, F16const = 63, F32const = 64, F64const = 65, F128const = 66, Vconst = 67, Shuffle = 68, Nop = 69, Select = 70, SelectSpectreGuard = 71, Bitselect = 72, X86Blendv = 73, VanyTrue = 74, VallTrue = 75, VhighBits = 76, Icmp = 77, IcmpImm = 78, Iadd = 79, Isub = 80, Ineg = 81, Iabs = 82, Imul = 83, Umulhi = 84, Smulhi = 85, SqmulRoundSat = 86, X86Pmulhrsw = 87, Udiv = 88, Sdiv = 89, Urem = 90, Srem = 91, IaddImm = 92, ImulImm = 93, UdivImm = 94, SdivImm = 95, UremImm = 96, SremImm = 97, IrsubImm = 98, SaddOverflowCin = 99, UaddOverflowCin = 100, UaddOverflow = 101, SaddOverflow = 102, UsubOverflow = 103, SsubOverflow = 104, UmulOverflow = 105, SmulOverflow = 106, UaddOverflowTrap = 107, SsubOverflowBin = 108, UsubOverflowBin = 109, Band = 110, Bor = 111, Bxor = 112, Bnot = 113, BandNot = 114, BorNot = 115, BxorNot = 116, BandImm = 117, BorImm = 118, BxorImm = 119, Rotl = 120, Rotr = 121, RotlImm = 122, RotrImm = 123, Ishl = 124, Ushr = 125, Sshr = 126, IshlImm = 127, UshrImm = 128, SshrImm = 129, Bitrev = 130, Clz = 131, Cls = 132, Ctz = 133, Bswap = 134, Popcnt = 135, Fcmp = 136, Fadd = 137, Fsub = 138, Fmul = 139, Fdiv = 140, Sqrt = 141, Fma = 142, Fneg = 143, Fabs = 144, Fcopysign = 145, Fmin = 146, Fmax = 147, Ceil = 148, Floor = 149, Trunc = 150, Nearest = 151, Bitcast = 152, ScalarToVector = 153, Bmask = 154, Ireduce = 155, Snarrow = 156, Unarrow = 157, Uunarrow = 158, SwidenLow = 159, SwidenHigh = 160, UwidenLow = 161, UwidenHigh = 162, IaddPairwise = 163, X86Pmaddubsw = 164, Uextend = 165, Sextend = 166, Fpromote = 167, Fdemote = 168, Fvdemote = 169, FvpromoteLow = 170, FcvtToUint = 171, FcvtToSint = 172, FcvtToUintSat = 173, FcvtToSintSat = 174, X86Cvtt2dq = 175, FcvtFromUint = 176, FcvtFromSint = 177, Isplit = 178, Iconcat = 179, AtomicRmw = 180, AtomicCas = 181, AtomicLoad = 182, AtomicStore = 183, Fence = 184, ExtractVector = 185,
}
Expand description

An instruction opcode.

All instructions from all supported ISAs are present.

Variants§

§

Jump = 1

jump block_call. (Jump)

§

Brif = 2

brif c, block_then, block_else. (Brif) Type inferred from c.

§

BrTable = 3

br_table x, JT. (BranchTable)

§

Debugtrap = 4

debugtrap. (NullAry)

§

Trap = 5

trap code. (Trap)

§

Trapz = 6

trapz c, code. (CondTrap) Type inferred from c.

§

Trapnz = 7

trapnz c, code. (CondTrap) Type inferred from c.

§

Return = 8

return rvals. (MultiAry)

§

Call = 9

rvals = call FN, args. (Call)

§

CallIndirect = 10

rvals = call_indirect SIG, callee, args. (CallIndirect) Type inferred from callee.

§

ReturnCall = 11

return_call FN, args. (Call)

§

ReturnCallIndirect = 12

return_call_indirect SIG, callee, args. (CallIndirect) Type inferred from callee.

§

FuncAddr = 13

addr = func_addr FN. (FuncAddr)

§

TryCall = 14

try_call callee, args, ET. (TryCall)

§

TryCallIndirect = 15

try_call_indirect callee, args, ET. (TryCallIndirect) Type inferred from callee.

§

Splat = 16

a = splat x. (Unary)

§

Swizzle = 17

a = swizzle x, y. (Binary)

§

X86Pshufb = 18

a = x86_pshufb x, y. (Binary)

§

Insertlane = 19

a = insertlane x, y, Idx. (TernaryImm8) Type inferred from x.

§

Extractlane = 20

a = extractlane x, Idx. (BinaryImm8) Type inferred from x.

§

Smin = 21

a = smin x, y. (Binary) Type inferred from x.

§

Umin = 22

a = umin x, y. (Binary) Type inferred from x.

§

Smax = 23

a = smax x, y. (Binary) Type inferred from x.

§

Umax = 24

a = umax x, y. (Binary) Type inferred from x.

§

AvgRound = 25

a = avg_round x, y. (Binary) Type inferred from x.

§

UaddSat = 26

a = uadd_sat x, y. (Binary) Type inferred from x.

§

SaddSat = 27

a = sadd_sat x, y. (Binary) Type inferred from x.

§

UsubSat = 28

a = usub_sat x, y. (Binary) Type inferred from x.

§

SsubSat = 29

a = ssub_sat x, y. (Binary) Type inferred from x.

§

Load = 30

a = load MemFlags, p, Offset. (Load)

§

Store = 31

store MemFlags, x, p, Offset. (Store) Type inferred from x.

§

Uload8 = 32

a = uload8 MemFlags, p, Offset. (Load)

§

Sload8 = 33

a = sload8 MemFlags, p, Offset. (Load)

§

Istore8 = 34

istore8 MemFlags, x, p, Offset. (Store) Type inferred from x.

§

Uload16 = 35

a = uload16 MemFlags, p, Offset. (Load)

§

Sload16 = 36

a = sload16 MemFlags, p, Offset. (Load)

§

Istore16 = 37

istore16 MemFlags, x, p, Offset. (Store) Type inferred from x.

§

Uload32 = 38

a = uload32 MemFlags, p, Offset. (Load) Type inferred from p.

§

Sload32 = 39

a = sload32 MemFlags, p, Offset. (Load) Type inferred from p.

§

Istore32 = 40

istore32 MemFlags, x, p, Offset. (Store) Type inferred from x.

§

StackSwitch = 41

out_payload0 = stack_switch store_context_ptr, load_context_ptr, in_payload0. (Ternary) Type inferred from load_context_ptr.

§

Uload8x8 = 42

a = uload8x8 MemFlags, p, Offset. (Load) Type inferred from p.

§

Sload8x8 = 43

a = sload8x8 MemFlags, p, Offset. (Load) Type inferred from p.

§

Uload16x4 = 44

a = uload16x4 MemFlags, p, Offset. (Load) Type inferred from p.

§

Sload16x4 = 45

a = sload16x4 MemFlags, p, Offset. (Load) Type inferred from p.

§

Uload32x2 = 46

a = uload32x2 MemFlags, p, Offset. (Load) Type inferred from p.

§

Sload32x2 = 47

a = sload32x2 MemFlags, p, Offset. (Load) Type inferred from p.

§

StackLoad = 48

a = stack_load SS, Offset. (StackLoad)

§

StackStore = 49

stack_store x, SS, Offset. (StackStore) Type inferred from x.

§

StackAddr = 50

addr = stack_addr SS, Offset. (StackLoad)

§

DynamicStackLoad = 51

a = dynamic_stack_load DSS. (DynamicStackLoad)

§

DynamicStackStore = 52

dynamic_stack_store x, DSS. (DynamicStackStore) Type inferred from x.

§

DynamicStackAddr = 53

addr = dynamic_stack_addr DSS. (DynamicStackLoad)

§

GlobalValue = 54

a = global_value GV. (UnaryGlobalValue)

§

SymbolValue = 55

a = symbol_value GV. (UnaryGlobalValue)

§

TlsValue = 56

a = tls_value GV. (UnaryGlobalValue)

§

GetPinnedReg = 57

addr = get_pinned_reg. (NullAry)

§

SetPinnedReg = 58

set_pinned_reg addr. (Unary) Type inferred from addr.

§

GetFramePointer = 59

addr = get_frame_pointer. (NullAry)

§

GetStackPointer = 60

addr = get_stack_pointer. (NullAry)

§

GetReturnAddress = 61

addr = get_return_address. (NullAry)

§

Iconst = 62

a = iconst N. (UnaryImm)

§

F16const = 63

a = f16const N. (UnaryIeee16)

§

F32const = 64

a = f32const N. (UnaryIeee32)

§

F64const = 65

a = f64const N. (UnaryIeee64)

§

F128const = 66

a = f128const N. (UnaryConst)

§

Vconst = 67

a = vconst N. (UnaryConst)

§

Shuffle = 68

a = shuffle a, b, mask. (Shuffle)

§

Nop = 69

nop. (NullAry)

§

Select = 70

a = select c, x, y. (Ternary) Type inferred from x.

§

SelectSpectreGuard = 71

a = select_spectre_guard c, x, y. (Ternary) Type inferred from x.

§

Bitselect = 72

a = bitselect c, x, y. (Ternary) Type inferred from x.

§

X86Blendv = 73

a = x86_blendv c, x, y. (Ternary) Type inferred from x.

§

VanyTrue = 74

s = vany_true a. (Unary) Type inferred from a.

§

VallTrue = 75

s = vall_true a. (Unary) Type inferred from a.

§

VhighBits = 76

x = vhigh_bits a. (Unary)

§

Icmp = 77

a = icmp Cond, x, y. (IntCompare) Type inferred from x.

§

IcmpImm = 78

a = icmp_imm Cond, x, Y. (IntCompareImm) Type inferred from x.

§

Iadd = 79

a = iadd x, y. (Binary) Type inferred from x.

§

Isub = 80

a = isub x, y. (Binary) Type inferred from x.

§

Ineg = 81

a = ineg x. (Unary) Type inferred from x.

§

Iabs = 82

a = iabs x. (Unary) Type inferred from x.

§

Imul = 83

a = imul x, y. (Binary) Type inferred from x.

§

Umulhi = 84

a = umulhi x, y. (Binary) Type inferred from x.

§

Smulhi = 85

a = smulhi x, y. (Binary) Type inferred from x.

§

SqmulRoundSat = 86

a = sqmul_round_sat x, y. (Binary) Type inferred from x.

§

X86Pmulhrsw = 87

a = x86_pmulhrsw x, y. (Binary) Type inferred from x.

§

Udiv = 88

a = udiv x, y. (Binary) Type inferred from x.

§

Sdiv = 89

a = sdiv x, y. (Binary) Type inferred from x.

§

Urem = 90

a = urem x, y. (Binary) Type inferred from x.

§

Srem = 91

a = srem x, y. (Binary) Type inferred from x.

§

IaddImm = 92

a = iadd_imm x, Y. (BinaryImm64) Type inferred from x.

§

ImulImm = 93

a = imul_imm x, Y. (BinaryImm64) Type inferred from x.

§

UdivImm = 94

a = udiv_imm x, Y. (BinaryImm64) Type inferred from x.

§

SdivImm = 95

a = sdiv_imm x, Y. (BinaryImm64) Type inferred from x.

§

UremImm = 96

a = urem_imm x, Y. (BinaryImm64) Type inferred from x.

§

SremImm = 97

a = srem_imm x, Y. (BinaryImm64) Type inferred from x.

§

IrsubImm = 98

a = irsub_imm x, Y. (BinaryImm64) Type inferred from x.

§

SaddOverflowCin = 99

a, c_out = sadd_overflow_cin x, y, c_in. (Ternary) Type inferred from y.

§

UaddOverflowCin = 100

a, c_out = uadd_overflow_cin x, y, c_in. (Ternary) Type inferred from y.

§

UaddOverflow = 101

a, of = uadd_overflow x, y. (Binary) Type inferred from x.

§

SaddOverflow = 102

a, of = sadd_overflow x, y. (Binary) Type inferred from x.

§

UsubOverflow = 103

a, of = usub_overflow x, y. (Binary) Type inferred from x.

§

SsubOverflow = 104

a, of = ssub_overflow x, y. (Binary) Type inferred from x.

§

UmulOverflow = 105

a, of = umul_overflow x, y. (Binary) Type inferred from x.

§

SmulOverflow = 106

a, of = smul_overflow x, y. (Binary) Type inferred from x.

§

UaddOverflowTrap = 107

a = uadd_overflow_trap x, y, code. (IntAddTrap) Type inferred from x.

§

SsubOverflowBin = 108

a, b_out = ssub_overflow_bin x, y, b_in. (Ternary) Type inferred from y.

§

UsubOverflowBin = 109

a, b_out = usub_overflow_bin x, y, b_in. (Ternary) Type inferred from y.

§

Band = 110

a = band x, y. (Binary) Type inferred from x.

§

Bor = 111

a = bor x, y. (Binary) Type inferred from x.

§

Bxor = 112

a = bxor x, y. (Binary) Type inferred from x.

§

Bnot = 113

a = bnot x. (Unary) Type inferred from x.

§

BandNot = 114

a = band_not x, y. (Binary) Type inferred from x.

§

BorNot = 115

a = bor_not x, y. (Binary) Type inferred from x.

§

BxorNot = 116

a = bxor_not x, y. (Binary) Type inferred from x.

§

BandImm = 117

a = band_imm x, Y. (BinaryImm64) Type inferred from x.

§

BorImm = 118

a = bor_imm x, Y. (BinaryImm64) Type inferred from x.

§

BxorImm = 119

a = bxor_imm x, Y. (BinaryImm64) Type inferred from x.

§

Rotl = 120

a = rotl x, y. (Binary) Type inferred from x.

§

Rotr = 121

a = rotr x, y. (Binary) Type inferred from x.

§

RotlImm = 122

a = rotl_imm x, Y. (BinaryImm64) Type inferred from x.

§

RotrImm = 123

a = rotr_imm x, Y. (BinaryImm64) Type inferred from x.

§

Ishl = 124

a = ishl x, y. (Binary) Type inferred from x.

§

Ushr = 125

a = ushr x, y. (Binary) Type inferred from x.

§

Sshr = 126

a = sshr x, y. (Binary) Type inferred from x.

§

IshlImm = 127

a = ishl_imm x, Y. (BinaryImm64) Type inferred from x.

§

UshrImm = 128

a = ushr_imm x, Y. (BinaryImm64) Type inferred from x.

§

SshrImm = 129

a = sshr_imm x, Y. (BinaryImm64) Type inferred from x.

§

Bitrev = 130

a = bitrev x. (Unary) Type inferred from x.

§

Clz = 131

a = clz x. (Unary) Type inferred from x.

§

Cls = 132

a = cls x. (Unary) Type inferred from x.

§

Ctz = 133

a = ctz x. (Unary) Type inferred from x.

§

Bswap = 134

a = bswap x. (Unary) Type inferred from x.

§

Popcnt = 135

a = popcnt x. (Unary) Type inferred from x.

§

Fcmp = 136

a = fcmp Cond, x, y. (FloatCompare) Type inferred from x.

§

Fadd = 137

a = fadd x, y. (Binary) Type inferred from x.

§

Fsub = 138

a = fsub x, y. (Binary) Type inferred from x.

§

Fmul = 139

a = fmul x, y. (Binary) Type inferred from x.

§

Fdiv = 140

a = fdiv x, y. (Binary) Type inferred from x.

§

Sqrt = 141

a = sqrt x. (Unary) Type inferred from x.

§

Fma = 142

a = fma x, y, z. (Ternary) Type inferred from y.

§

Fneg = 143

a = fneg x. (Unary) Type inferred from x.

§

Fabs = 144

a = fabs x. (Unary) Type inferred from x.

§

Fcopysign = 145

a = fcopysign x, y. (Binary) Type inferred from x.

§

Fmin = 146

a = fmin x, y. (Binary) Type inferred from x.

§

Fmax = 147

a = fmax x, y. (Binary) Type inferred from x.

§

Ceil = 148

a = ceil x. (Unary) Type inferred from x.

§

Floor = 149

a = floor x. (Unary) Type inferred from x.

§

Trunc = 150

a = trunc x. (Unary) Type inferred from x.

§

Nearest = 151

a = nearest x. (Unary) Type inferred from x.

§

Bitcast = 152

a = bitcast MemFlags, x. (LoadNoOffset)

§

ScalarToVector = 153

a = scalar_to_vector s. (Unary)

§

Bmask = 154

a = bmask x. (Unary)

§

Ireduce = 155

a = ireduce x. (Unary)

§

Snarrow = 156

a = snarrow x, y. (Binary) Type inferred from x.

§

Unarrow = 157

a = unarrow x, y. (Binary) Type inferred from x.

§

Uunarrow = 158

a = uunarrow x, y. (Binary) Type inferred from x.

§

SwidenLow = 159

a = swiden_low x. (Unary) Type inferred from x.

§

SwidenHigh = 160

a = swiden_high x. (Unary) Type inferred from x.

§

UwidenLow = 161

a = uwiden_low x. (Unary) Type inferred from x.

§

UwidenHigh = 162

a = uwiden_high x. (Unary) Type inferred from x.

§

IaddPairwise = 163

a = iadd_pairwise x, y. (Binary) Type inferred from x.

§

X86Pmaddubsw = 164

a = x86_pmaddubsw x, y. (Binary)

§

Uextend = 165

a = uextend x. (Unary)

§

Sextend = 166

a = sextend x. (Unary)

§

Fpromote = 167

a = fpromote x. (Unary)

§

Fdemote = 168

a = fdemote x. (Unary)

§

Fvdemote = 169

a = fvdemote x. (Unary)

§

FvpromoteLow = 170

x = fvpromote_low a. (Unary)

§

FcvtToUint = 171

a = fcvt_to_uint x. (Unary)

§

FcvtToSint = 172

a = fcvt_to_sint x. (Unary)

§

FcvtToUintSat = 173

a = fcvt_to_uint_sat x. (Unary)

§

FcvtToSintSat = 174

a = fcvt_to_sint_sat x. (Unary)

§

X86Cvtt2dq = 175

a = x86_cvtt2dq x. (Unary)

§

FcvtFromUint = 176

a = fcvt_from_uint x. (Unary)

§

FcvtFromSint = 177

a = fcvt_from_sint x. (Unary)

§

Isplit = 178

lo, hi = isplit x. (Unary) Type inferred from x.

§

Iconcat = 179

a = iconcat lo, hi. (Binary) Type inferred from lo.

§

AtomicRmw = 180

a = atomic_rmw MemFlags, AtomicRmwOp, p, x. (AtomicRmw)

§

AtomicCas = 181

a = atomic_cas MemFlags, p, e, x. (AtomicCas) Type inferred from x.

§

AtomicLoad = 182

a = atomic_load MemFlags, p. (LoadNoOffset)

§

AtomicStore = 183

atomic_store MemFlags, x, p. (StoreNoOffset) Type inferred from x.

§

Fence = 184

fence. (NullAry)

§

ExtractVector = 185

a = extract_vector x, y. (BinaryImm8) Type inferred from x.

Implementations§

Source§

impl Opcode

Source

pub fn is_terminator(self) -> bool

True for instructions that terminate the block

Source

pub fn is_branch(self) -> bool

True for all branch or jump instructions.

Source

pub fn is_call(self) -> bool

Is this a call instruction?

Source

pub fn is_return(self) -> bool

Is this a return instruction?

Source

pub fn can_load(self) -> bool

Can this instruction read from memory?

Source

pub fn can_store(self) -> bool

Can this instruction write to memory?

Source

pub fn can_trap(self) -> bool

Can this instruction cause a trap?

Source

pub fn other_side_effects(self) -> bool

Does this instruction have other side effects besides can_* flags?

Source

pub fn side_effects_idempotent(self) -> bool

Despite having side effects, is this instruction okay to GVN?

Source

pub fn all() -> &'static [Opcode]

All cranelift opcodes.

Source§

impl Opcode

Source

pub fn format(self) -> InstructionFormat

Get the instruction format for this opcode.

Source

pub fn constraints(self) -> OpcodeConstraints

Get the constraint descriptor for this opcode. Panic if this is called on NotAnOpcode.

Source

pub fn is_safepoint(self) -> bool

Is this instruction a GC safepoint?

Safepoints are all kinds of calls, except for tail calls.

Trait Implementations§

Source§

impl Clone for Opcode

Source§

fn clone(&self) -> Opcode

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

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Opcode

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Opcode

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for Opcode

Source§

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

Formats the value using the given formatter. Read more
Source§

impl FromStr for Opcode

Source§

fn from_str(s: &str) -> Result<Self, &'static str>

Parse an Opcode name from a string.

Source§

type Err = &'static str

The associated error which can be returned from parsing.
Source§

impl Hash for Opcode

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Opcode

Source§

fn eq(&self, other: &Opcode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Opcode

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Copy for Opcode

Source§

impl Eq for Opcode

Source§

impl StructuralPartialEq for Opcode

Auto Trait Implementations§

§

impl Freeze for Opcode

§

impl RefUnwindSafe for Opcode

§

impl Send for Opcode

§

impl Sync for Opcode

§

impl Unpin for Opcode

§

impl UnwindSafe for Opcode

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

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

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,