Enum sway_error::error::CompileError
source · pub enum CompileError {
Show 184 variants
ModuleDepGraphEvaluationError {},
ModuleDepGraphCyclicReference {
modules: Vec<BaseIdent>,
},
UnknownVariable {
var_name: Ident,
span: Span,
},
NotAVariable {
name: Ident,
what_it_is: &'static str,
span: Span,
},
Unimplemented(&'static str, Span),
UnimplementedWithHelp(&'static str, &'static str, Span),
TypeError(TypeError),
ParseError {
span: Span,
err: String,
},
Internal(&'static str, Span),
InternalOwned(String, Span),
NoPredicateMainFunction(Span),
PredicateMainDoesNotReturnBool(Span),
NoScriptMainFunction(Span),
MultipleDefinitionsOfFallbackFunction {
name: Ident,
span: Span,
},
MultipleDefinitionsOfFunction {
name: Ident,
span: Span,
},
MultipleDefinitionsOfName {
name: Ident,
span: Span,
},
MultipleDefinitionsOfConstant {
name: Ident,
span: Span,
},
MultipleDefinitionsOfType {
name: Ident,
span: Span,
},
MultipleDefinitionsOfMatchArmVariable {
match_value: Span,
match_type: String,
first_definition: Span,
first_definition_is_struct_field: bool,
duplicate: Span,
duplicate_is_struct_field: bool,
},
AssignmentToNonMutable {
name: Ident,
span: Span,
},
MethodRequiresMutableSelf {
method_name: Ident,
variable_name: Ident,
span: Span,
},
MutableParameterNotSupported {
param_name: Ident,
span: Span,
},
ImmutableArgumentToMutableParameter {
span: Span,
},
RefMutableNotAllowedInContractAbi {
param_name: Ident,
span: Span,
},
RefMutCannotReferenceConstant {
constant: String,
span: Span,
},
RefMutCannotReferenceImmutableVariable {
decl_name: Ident,
span: Span,
},
AssociatedFunctionCalledAsMethod {
fn_name: Ident,
span: Span,
},
TypeParameterNotInTypeScope {
name: Ident,
span: Span,
comma_separated_generic_params: String,
fn_name: Ident,
args: String,
},
MismatchedTypeInInterfaceSurface {
interface_name: InterfaceName,
span: Span,
decl_type: String,
given: String,
expected: String,
},
UnknownTrait {
span: Span,
name: Ident,
},
FunctionNotAPartOfInterfaceSurface {
name: Ident,
interface_name: InterfaceName,
span: Span,
},
ConstantNotAPartOfInterfaceSurface {
name: Ident,
interface_name: InterfaceName,
span: Span,
},
TypeNotAPartOfInterfaceSurface {
name: Ident,
interface_name: InterfaceName,
span: Span,
},
MissingInterfaceSurfaceConstants {
missing_constants: Vec<BaseIdent>,
span: Span,
},
MissingInterfaceSurfaceTypes {
missing_types: Vec<BaseIdent>,
span: Span,
},
MissingInterfaceSurfaceMethods {
missing_functions: Vec<BaseIdent>,
span: Span,
},
IncorrectNumberOfTypeArguments {
name: Ident,
given: usize,
expected: usize,
span: Span,
},
DoesNotTakeTypeArguments {
name: Ident,
span: Span,
},
DoesNotTakeTypeArgumentsAsPrefix {
name: Ident,
span: Span,
},
TypeArgumentsNotAllowed {
span: Span,
},
NeedsTypeArguments {
name: Ident,
span: Span,
},
EnumNotFound {
name: Ident,
span: Span,
},
StructInstantiationMissingFieldForErrorRecovery {
field_name: Ident,
struct_name: Ident,
span: Span,
},
StructInstantiationMissingFields {
field_names: Vec<Ident>,
struct_name: Ident,
span: Span,
struct_decl_span: Span,
total_number_of_fields: usize,
},
StructCannotBeInstantiated {
struct_name: Ident,
span: Span,
struct_decl_span: Span,
private_fields: Vec<Ident>,
constructors: Vec<String>,
all_fields_are_private: bool,
is_in_storage_declaration: bool,
struct_can_be_changed: bool,
},
StructFieldIsPrivate {
field_name: IdentUnique,
struct_name: Ident,
field_decl_span: Span,
struct_can_be_changed: bool,
usage_context: StructFieldUsageContext,
},
StructFieldDoesNotExist {
field_name: IdentUnique,
available_fields: Vec<Ident>,
is_public_struct_access: bool,
struct_name: Ident,
struct_decl_span: Span,
struct_is_empty: bool,
usage_context: StructFieldUsageContext,
},
MethodNotFound {
method_name: Ident,
type_name: String,
span: Span,
},
ModuleNotFound {
span: Span,
name: String,
},
FieldAccessOnNonStruct {
actually: String,
storage_variable: Option<String>,
field_name: IdentUnique,
span: Span,
},
TupleElementAccessOnNonTuple {
actually: String,
span: Span,
index: usize,
index_span: Span,
},
NotIndexable {
actually: String,
span: Span,
},
NotAnEnum {
name: String,
span: Span,
actually: String,
},
NotAStruct {
span: Span,
actually: String,
},
DeclIsNotAnEnum {
actually: String,
span: Span,
},
DeclIsNotAStruct {
actually: String,
span: Span,
},
DeclIsNotAFunction {
actually: String,
span: Span,
},
DeclIsNotAVariable {
actually: String,
span: Span,
},
DeclIsNotAnAbi {
actually: String,
span: Span,
},
DeclIsNotATrait {
actually: String,
span: Span,
},
DeclIsNotAnImplTrait {
actually: String,
span: Span,
},
DeclIsNotATraitFn {
actually: String,
span: Span,
},
DeclIsNotStorage {
actually: String,
span: Span,
},
DeclIsNotAConstant {
actually: String,
span: Span,
},
DeclIsNotATypeAlias {
actually: String,
span: Span,
},
SymbolNotFound {
name: Ident,
span: Span,
},
ImportPrivateSymbol {
name: Ident,
span: Span,
},
ImportPrivateModule {
name: Ident,
span: Span,
},
NoElseBranch {
span: Span,
type: String,
},
NotAType {
span: Span,
name: String,
actually_is: &'static str,
},
MissingEnumInstantiator {
span: Span,
},
PathDoesNotReturn {
span: Span,
ty: String,
function_name: Ident,
},
ExpectedModuleDocComment {
span: Span,
},
UnknownRegister {
span: Span,
initialized_registers: String,
},
MissingImmediate {
span: Span,
},
InvalidImmediateValue {
span: Span,
},
UnknownEnumVariant {
enum_name: Ident,
variant_name: Ident,
span: Span,
},
UnrecognizedOp {
op_name: Ident,
span: Span,
},
UnableToInferGeneric {
ty: String,
span: Span,
},
UnconstrainedGenericParameter {
ty: String,
span: Span,
},
TraitConstraintNotSatisfied {
ty: String,
trait_name: String,
span: Span,
},
TraitConstraintMissing {
param: String,
trait_name: String,
span: Span,
},
Immediate06TooLarge {
val: u64,
span: Span,
},
Immediate12TooLarge {
val: u64,
span: Span,
},
Immediate18TooLarge {
val: u64,
span: Span,
},
Immediate24TooLarge {
val: u64,
span: Span,
},
IncorrectNumberOfAsmRegisters {
span: Span,
expected: usize,
received: usize,
},
UnnecessaryImmediate {
span: Span,
},
AmbiguousPath {
span: Span,
},
UnknownType {
span: Span,
},
UnknownTypeName {
name: String,
span: Span,
},
FileCouldNotBeRead {
span: Span,
file_path: String,
stringified_error: String,
},
ImportMustBeLibrary {
span: Span,
},
MoreThanOneEnumInstantiator {
span: Span,
ty: String,
},
UnnecessaryEnumInstantiator {
span: Span,
},
UnitVariantWithParenthesesEnumInstantiator {
span: Span,
ty: String,
},
TraitNotFound {
name: String,
span: Span,
},
TraitNotImportedAtFunctionApplication {
trait_name: String,
function_name: String,
function_call_site_span: Span,
trait_constraint_span: Span,
trait_candidates: Vec<String>,
},
InvalidExpressionOnLhs {
span: Span,
},
CannotBeEvaluatedToConst {
span: Span,
},
TooManyArgumentsForFunction {
span: Span,
method_name: Ident,
dot_syntax_used: bool,
expected: usize,
received: usize,
},
TooFewArgumentsForFunction {
span: Span,
method_name: Ident,
dot_syntax_used: bool,
expected: usize,
received: usize,
},
MissingParenthesesForFunction {
span: Span,
method_name: Ident,
},
InvalidAbiType {
span: Span,
},
NotAnAbi {
span: Span,
actually_is: &'static str,
},
ImplAbiForNonContract {
span: Span,
ty: String,
},
ConflictingImplsForTraitAndType {
trait_name: String,
type_implementing_for: String,
existing_impl_span: Span,
second_impl_span: Span,
},
DuplicateDeclDefinedForType {
decl_kind: String,
decl_name: String,
type_implementing_for: String,
span: Span,
},
IncorrectNumberOfInterfaceSurfaceFunctionParameters {
fn_name: Ident,
interface_name: InterfaceName,
num_parameters: usize,
provided_parameters: usize,
span: Span,
},
ArgumentParameterTypeMismatch {
span: Span,
should_be: String,
provided: String,
},
RecursiveCall {
fn_name: Ident,
span: Span,
},
RecursiveCallChain {
fn_name: Ident,
call_chain: String,
span: Span,
},
RecursiveType {
name: Ident,
span: Span,
},
RecursiveTypeChain {
name: Ident,
type_chain: String,
span: Span,
},
GMFromExternalContext {
span: Span,
},
MintFromExternalContext {
span: Span,
},
BurnFromExternalContext {
span: Span,
},
ContractStorageFromExternalContext {
span: Span,
},
InvalidOpcodeFromPredicate {
opcode: String,
span: Span,
},
ArrayOutOfBounds {
index: u64,
count: u64,
span: Span,
},
TupleIndexOutOfBounds {
index: usize,
count: usize,
tuple_type: String,
span: Span,
prefix_span: Span,
},
ConstantsCannotBeShadowed {
variable_or_constant: String,
name: IdentUnique,
constant_span: Span,
constant_decl: Span,
is_alias: bool,
},
ConstantShadowsVariable {
name: IdentUnique,
variable_span: Span,
},
ShadowsOtherSymbol {
name: IdentUnique,
},
GenericShadowsGeneric {
name: IdentUnique,
},
MatchExpressionNonExhaustive {
missing_patterns: String,
span: Span,
},
MatchStructPatternMissingFields {
missing_fields: Vec<Ident>,
missing_fields_are_public: bool,
struct_name: Ident,
struct_decl_span: Span,
total_number_of_fields: usize,
span: Span,
},
MatchStructPatternMustIgnorePrivateFields {
private_fields: Vec<Ident>,
struct_name: Ident,
struct_decl_span: Span,
all_fields_are_private: bool,
span: Span,
},
MatchArmVariableNotDefinedInAllAlternatives {
match_value: Span,
match_type: String,
variable: Ident,
missing_in_alternatives: Vec<Span>,
},
MatchArmVariableMismatchedType {
match_value: Span,
match_type: String,
variable: Ident,
first_definition: Span,
expected: String,
received: String,
},
StorageAccessMismatch {
attrs: String,
span: Span,
},
TraitDeclPureImplImpure {
fn_name: Ident,
interface_name: InterfaceName,
attrs: String,
span: Span,
},
TraitImplPurityMismatch {
fn_name: Ident,
interface_name: InterfaceName,
attrs: String,
span: Span,
},
ImpureInNonContract {
span: Span,
},
ImpureInPureContext {
storage_op: &'static str,
attrs: String,
span: Span,
},
ParameterRefMutabilityMismatch {
span: Span,
},
IntegerTooLarge {
span: Span,
ty: String,
},
IntegerTooSmall {
span: Span,
ty: String,
},
IntegerContainsInvalidDigit {
span: Span,
ty: String,
},
AbiAsSupertrait {
span: Span,
},
SupertraitImplRequired {
supertrait_name: String,
trait_name: Ident,
span: Span,
},
ContractCallParamRepeated {
param_name: String,
span: Span,
},
UnrecognizedContractParam {
param_name: String,
span: Span,
},
CallParamForNonContractCallMethod {
span: Span,
},
StorageFieldDoesNotExist {
field_name: IdentUnique,
available_fields: Vec<Ident>,
storage_decl_span: Span,
},
NoDeclaredStorage {
span: Span,
},
MultipleStorageDeclarations {
span: Span,
},
InvalidStorageOnlyTypeDecl {
ty: String,
span: Span,
},
UnexpectedDeclaration {
decl_type: &'static str,
span: Span,
},
ContractAddressMustBeKnown {
span: Span,
},
ConvertParseTree {
error: ConvertParseTreeError,
},
Lex {
error: LexError,
},
Parse {
error: ParseError,
},
NonConstantDeclValue {
span: Span,
},
StorageDeclarationInNonContract {
program_kind: String,
span: Span,
},
IntrinsicUnsupportedArgType {
name: String,
span: Span,
hint: String,
},
IntrinsicIncorrectNumArgs {
name: String,
expected: u64,
span: Span,
},
IntrinsicIncorrectNumTArgs {
name: String,
expected: u64,
span: Span,
},
ExpectedStringLiteral {
span: Span,
},
BreakOutsideLoop {
span: Span,
},
ContinueOutsideLoop {
span: Span,
},
ContractIdConstantNotAConstDecl {
span: Span,
},
ContractIdValueNotALiteral {
span: Span,
},
TypeNotAllowed {
reason: TypeNotAllowedReason,
span: Span,
},
RefMutableNotAllowedInMain {
param_name: Ident,
span: Span,
},
InitializedRegisterReassignment {
name: String,
span: Span,
},
DisallowedControlFlowInstruction {
name: String,
span: Span,
},
CallingPrivateLibraryMethod {
name: String,
span: Span,
},
DisallowedIntrinsicInPredicate {
intrinsic: String,
span: Span,
},
CoinsPassedToNonPayableMethod {
fn_name: Ident,
span: Span,
},
TraitImplPayabilityMismatch {
fn_name: Ident,
interface_name: InterfaceName,
missing_impl_attribute: bool,
span: Span,
},
ConfigurableInLibrary {
span: Span,
},
MultipleApplicableItemsInScope {
span: Span,
type_name: String,
item_name: String,
item_kind: String,
as_traits: Vec<String>,
},
NonStrGenericType {
span: Span,
},
ContractCallsItsOwnMethod {
span: Span,
},
AbiShadowsSuperAbiMethod {
span: Span,
superabi: Ident,
},
ConflictingSuperAbiMethods {
span: Span,
method_name: String,
superabi1: String,
superabi2: String,
},
AssociatedTypeNotSupportedInAbi {
span: Span,
},
AbiSupertraitMethodCallAsContractCall {
fn_name: Ident,
span: Span,
},
SelfIsNotValidAsImplementingFor {
span: Span,
},
UninitRegisterInAsmBlockBeingRead {
span: Span,
},
ExpressionCannotBeDereferenced {
expression_type: String,
span: Span,
},
FallbackFnsAreContractOnly {
span: Span,
},
FallbackFnsCannotHaveParameters {
span: Span,
},
}
Variants§
ModuleDepGraphEvaluationError
ModuleDepGraphCyclicReference
UnknownVariable
NotAVariable
Unimplemented(&'static str, Span)
UnimplementedWithHelp(&'static str, &'static str, Span)
TypeError(TypeError)
ParseError
Internal(&'static str, Span)
InternalOwned(String, Span)
NoPredicateMainFunction(Span)
PredicateMainDoesNotReturnBool(Span)
NoScriptMainFunction(Span)
MultipleDefinitionsOfFallbackFunction
MultipleDefinitionsOfFunction
MultipleDefinitionsOfName
MultipleDefinitionsOfConstant
MultipleDefinitionsOfType
MultipleDefinitionsOfMatchArmVariable
Fields
AssignmentToNonMutable
MethodRequiresMutableSelf
MutableParameterNotSupported
ImmutableArgumentToMutableParameter
RefMutableNotAllowedInContractAbi
RefMutCannotReferenceConstant
Fields
RefMutCannotReferenceImmutableVariable
AssociatedFunctionCalledAsMethod
TypeParameterNotInTypeScope
MismatchedTypeInInterfaceSurface
UnknownTrait
FunctionNotAPartOfInterfaceSurface
ConstantNotAPartOfInterfaceSurface
TypeNotAPartOfInterfaceSurface
MissingInterfaceSurfaceConstants
MissingInterfaceSurfaceTypes
MissingInterfaceSurfaceMethods
IncorrectNumberOfTypeArguments
DoesNotTakeTypeArguments
DoesNotTakeTypeArgumentsAsPrefix
TypeArgumentsNotAllowed
NeedsTypeArguments
EnumNotFound
StructInstantiationMissingFieldForErrorRecovery
This error is used only for error recovery and is not emitted as a compiler error to the final compilation output. The compiler emits the cumulative error CompileError::StructInstantiationMissingFields given below, and that one also only if the struct can actually be instantiated.
StructInstantiationMissingFields
Fields
StructCannotBeInstantiated
Fields
StructFieldIsPrivate
StructFieldDoesNotExist
MethodNotFound
ModuleNotFound
FieldAccessOnNonStruct
Fields
§
storage_variable: Option<String>
Name of the storage variable, if the field access happens within the access to a storage variable.
§
field_name: IdentUnique
Name of the field that is tried to be accessed.
TupleElementAccessOnNonTuple
NotIndexable
NotAnEnum
NotAStruct
DeclIsNotAnEnum
DeclIsNotAStruct
DeclIsNotAFunction
DeclIsNotAVariable
DeclIsNotAnAbi
DeclIsNotATrait
DeclIsNotAnImplTrait
DeclIsNotATraitFn
DeclIsNotStorage
DeclIsNotAConstant
DeclIsNotATypeAlias
SymbolNotFound
ImportPrivateSymbol
ImportPrivateModule
NoElseBranch
NotAType
MissingEnumInstantiator
PathDoesNotReturn
ExpectedModuleDocComment
UnknownRegister
MissingImmediate
InvalidImmediateValue
UnknownEnumVariant
UnrecognizedOp
UnableToInferGeneric
UnconstrainedGenericParameter
TraitConstraintNotSatisfied
TraitConstraintMissing
Immediate06TooLarge
Immediate12TooLarge
Immediate18TooLarge
Immediate24TooLarge
IncorrectNumberOfAsmRegisters
UnnecessaryImmediate
AmbiguousPath
UnknownType
UnknownTypeName
FileCouldNotBeRead
ImportMustBeLibrary
MoreThanOneEnumInstantiator
UnnecessaryEnumInstantiator
UnitVariantWithParenthesesEnumInstantiator
TraitNotFound
TraitNotImportedAtFunctionApplication
Fields
InvalidExpressionOnLhs
CannotBeEvaluatedToConst
TooManyArgumentsForFunction
TooFewArgumentsForFunction
MissingParenthesesForFunction
InvalidAbiType
NotAnAbi
ImplAbiForNonContract
ConflictingImplsForTraitAndType
Fields
DuplicateDeclDefinedForType
IncorrectNumberOfInterfaceSurfaceFunctionParameters
Fields
§
interface_name: InterfaceName
ArgumentParameterTypeMismatch
RecursiveCall
RecursiveCallChain
RecursiveType
RecursiveTypeChain
GMFromExternalContext
MintFromExternalContext
BurnFromExternalContext
ContractStorageFromExternalContext
InvalidOpcodeFromPredicate
ArrayOutOfBounds
TupleIndexOutOfBounds
ConstantsCannotBeShadowed
Fields
§
name: IdentUnique
ConstantShadowsVariable
ShadowsOtherSymbol
Fields
§
name: IdentUnique
GenericShadowsGeneric
Fields
§
name: IdentUnique
MatchExpressionNonExhaustive
MatchStructPatternMissingFields
Fields
MatchStructPatternMustIgnorePrivateFields
Fields
MatchArmVariableNotDefinedInAllAlternatives
MatchArmVariableMismatchedType
Fields
StorageAccessMismatch
TraitDeclPureImplImpure
TraitImplPurityMismatch
ImpureInNonContract
ImpureInPureContext
ParameterRefMutabilityMismatch
IntegerTooLarge
IntegerTooSmall
IntegerContainsInvalidDigit
AbiAsSupertrait
SupertraitImplRequired
ContractCallParamRepeated
UnrecognizedContractParam
CallParamForNonContractCallMethod
StorageFieldDoesNotExist
NoDeclaredStorage
MultipleStorageDeclarations
InvalidStorageOnlyTypeDecl
UnexpectedDeclaration
ContractAddressMustBeKnown
ConvertParseTree
Fields
§
error: ConvertParseTreeError
Lex
Parse
Fields
§
error: ParseError
NonConstantDeclValue
StorageDeclarationInNonContract
IntrinsicUnsupportedArgType
IntrinsicIncorrectNumArgs
IntrinsicIncorrectNumTArgs
ExpectedStringLiteral
BreakOutsideLoop
ContinueOutsideLoop
ContractIdConstantNotAConstDecl
This will be removed once loading contract IDs in a dependency namespace is refactored and no longer manual: https://github.com/FuelLabs/sway/issues/3077
ContractIdValueNotALiteral
This will be removed once loading contract IDs in a dependency namespace is refactored and no longer manual: https://github.com/FuelLabs/sway/issues/3077
TypeNotAllowed
RefMutableNotAllowedInMain
InitializedRegisterReassignment
DisallowedControlFlowInstruction
CallingPrivateLibraryMethod
DisallowedIntrinsicInPredicate
CoinsPassedToNonPayableMethod
TraitImplPayabilityMismatch
ConfigurableInLibrary
MultipleApplicableItemsInScope
NonStrGenericType
ContractCallsItsOwnMethod
AbiShadowsSuperAbiMethod
ConflictingSuperAbiMethods
AssociatedTypeNotSupportedInAbi
AbiSupertraitMethodCallAsContractCall
SelfIsNotValidAsImplementingFor
UninitRegisterInAsmBlockBeingRead
ExpressionCannotBeDereferenced
FallbackFnsAreContractOnly
FallbackFnsCannotHaveParameters
Trait Implementations§
source§impl Clone for CompileError
impl Clone for CompileError
source§fn clone(&self) -> CompileError
fn clone(&self) -> CompileError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CompileError
impl Debug for CompileError
source§impl Display for CompileError
impl Display for CompileError
source§impl Error for CompileError
impl Error for CompileError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<ConvertParseTreeError> for CompileError
impl From<ConvertParseTreeError> for CompileError
source§fn from(source: ConvertParseTreeError) -> Self
fn from(source: ConvertParseTreeError) -> Self
Converts to this type from the input type.
source§impl From<TypeError> for CompileError
impl From<TypeError> for CompileError
source§fn from(other: TypeError) -> CompileError
fn from(other: TypeError) -> CompileError
Converts to this type from the input type.
source§impl Hash for CompileError
impl Hash for CompileError
source§impl PartialEq for CompileError
impl PartialEq for CompileError
source§fn eq(&self, other: &CompileError) -> bool
fn eq(&self, other: &CompileError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl ToDiagnostic for CompileError
impl ToDiagnostic for CompileError
fn to_diagnostic(&self, source_engine: &SourceEngine) -> Diagnostic
impl Eq for CompileError
impl StructuralPartialEq for CompileError
Auto Trait Implementations§
impl Freeze for CompileError
impl RefUnwindSafe for CompileError
impl Send for CompileError
impl Sync for CompileError
impl Unpin for CompileError
impl UnwindSafe for CompileError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> FmtForward for T
impl<T> FmtForward for T
source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self
to use its Binary
implementation when Debug
-formatted.source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
Causes
self
to use its Display
implementation when
Debug
-formatted.source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
Causes
self
to use its LowerExp
implementation when
Debug
-formatted.source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
Causes
self
to use its LowerHex
implementation when
Debug
-formatted.source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self
to use its Octal
implementation when Debug
-formatted.source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
Causes
self
to use its Pointer
implementation when
Debug
-formatted.source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
Causes
self
to use its UpperExp
implementation when
Debug
-formatted.source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self
to use its UpperHex
implementation when
Debug
-formatted.source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self
and passes that borrow into the pipe function. Read moresource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self
and passes that borrow into the pipe function. Read moresource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> R
source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self
, then passes self.as_ref()
into the pipe function.source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self
, then passes self.as_mut()
into the pipe
function.source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self
, then passes self.deref()
into the pipe function.source§impl<T> StorageAsMut for T
impl<T> StorageAsMut for T
fn storage<Type>(&mut self) -> StorageMut<'_, Self, Type>where
Type: Mappable,
fn storage_as_mut<Type>(&mut self) -> StorageMut<'_, Self, Type>where
Type: Mappable,
source§impl<T> StorageAsRef for T
impl<T> StorageAsRef for T
fn storage<Type>(&self) -> StorageRef<'_, Self, Type>where
Type: Mappable,
fn storage_as_ref<Type>(&self) -> StorageRef<'_, Self, Type>where
Type: Mappable,
source§impl<T> Tap for T
impl<T> Tap for T
source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B>
of a value. Read moresource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B>
of a value. Read moresource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R>
view of a value. Read moresource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R>
view of a value. Read moresource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target
of a value. Read moresource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target
of a value. Read moresource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap()
only in debug builds, and is erased in release builds.source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut()
only in debug builds, and is erased in release
builds.source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow()
only in debug builds, and is erased in release
builds.source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref()
only in debug builds, and is erased in release
builds.source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut()
only in debug builds, and is erased in release
builds.source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref()
only in debug builds, and is erased in release
builds.