Enum sway_error::error::CompileError
source · pub enum CompileError {
Show 165 variants
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),
MultipleDefinitionsOfFunction {
name: Ident,
span: Span,
},
MultipleDefinitionsOfName {
name: Ident,
span: Span,
},
MultipleDefinitionsOfConstant {
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,
},
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,
},
MissingInterfaceSurfaceConstants {
missing_constants: String,
span: Span,
},
MissingInterfaceSurfaceMethods {
missing_functions: String,
span: Span,
},
IncorrectNumberOfTypeArguments {
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,
},
StructMissingField {
field_name: Ident,
struct_name: Ident,
span: Span,
},
StructDoesNotHaveField {
field_name: Ident,
struct_name: Ident,
span: Span,
},
MethodNotFound {
method_name: Ident,
type_name: String,
span: Span,
},
ModuleNotFound {
span: Span,
name: String,
},
FieldAccessOnNonStruct {
actually: String,
span: Span,
},
NotATuple {
name: String,
span: Span,
actually: String,
},
NotIndexable {
name: String,
span: Span,
actually: String,
},
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,
},
FieldNotFound {
field_name: Ident,
available_fields: String,
struct_name: Ident,
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,
},
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,
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,
span: Span,
},
ConstantsCannotBeShadowed {
variable_or_constant: String,
name: Ident,
constant_span: Span,
constant_decl: Span,
is_alias: bool,
},
ConstantShadowsVariable {
name: Ident,
variable_span: Span,
},
ShadowsOtherSymbol {
name: Ident,
},
GenericShadowsGeneric {
name: Ident,
},
MatchExpressionNonExhaustive {
missing_patterns: String,
span: Span,
},
MatchStructPatternMissingFields {
missing_fields: Vec<String>,
span: Span,
},
MatchVariableNotBoundInAllPatterns {
var: Ident,
span: Span,
},
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 {
name: Ident,
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,
method_name: 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,
},
AbiSupertraitMethodCallAsContractCall {
fn_name: Ident,
span: Span,
},
}
Variants§
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)
MultipleDefinitionsOfFunction
MultipleDefinitionsOfName
MultipleDefinitionsOfConstant
MultipleDefinitionsOfMatchArmVariable
Fields
AssignmentToNonMutable
MethodRequiresMutableSelf
MutableParameterNotSupported
ImmutableArgumentToMutableParameter
RefMutableNotAllowedInContractAbi
AssociatedFunctionCalledAsMethod
TypeParameterNotInTypeScope
MismatchedTypeInInterfaceSurface
UnknownTrait
FunctionNotAPartOfInterfaceSurface
ConstantNotAPartOfInterfaceSurface
MissingInterfaceSurfaceConstants
MissingInterfaceSurfaceMethods
IncorrectNumberOfTypeArguments
DoesNotTakeTypeArguments
DoesNotTakeTypeArgumentsAsPrefix
TypeArgumentsNotAllowed
NeedsTypeArguments
EnumNotFound
StructMissingField
StructDoesNotHaveField
MethodNotFound
ModuleNotFound
FieldAccessOnNonStruct
NotATuple
NotIndexable
NotAnEnum
NotAStruct
DeclIsNotAnEnum
DeclIsNotAStruct
DeclIsNotAFunction
DeclIsNotAVariable
DeclIsNotAnAbi
DeclIsNotATrait
DeclIsNotAnImplTrait
DeclIsNotATraitFn
DeclIsNotStorage
DeclIsNotAConstant
DeclIsNotATypeAlias
FieldNotFound
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
InvalidExpressionOnLhs
CannotBeEvaluatedToConst
TooManyArgumentsForFunction
TooFewArgumentsForFunction
MissingParenthesesForFunction
InvalidAbiType
NotAnAbi
ImplAbiForNonContract
ConflictingImplsForTraitAndType
DuplicateDeclDefinedForType
IncorrectNumberOfInterfaceSurfaceFunctionParameters
Fields
§
interface_name: InterfaceName
ArgumentParameterTypeMismatch
RecursiveCall
RecursiveCallChain
RecursiveType
RecursiveTypeChain
GMFromExternalContext
MintFromExternalContext
BurnFromExternalContext
ContractStorageFromExternalContext
InvalidOpcodeFromPredicate
ArrayOutOfBounds
TupleIndexOutOfBounds
ConstantsCannotBeShadowed
Fields
ConstantShadowsVariable
ShadowsOtherSymbol
GenericShadowsGeneric
MatchExpressionNonExhaustive
MatchStructPatternMissingFields
MatchVariableNotBoundInAllPatterns
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
AbiSupertraitMethodCallAsContractCall
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<CompileError> for CompileError
impl PartialEq<CompileError> 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 StructuralEq for CompileError
impl StructuralPartialEq for CompileError
Auto Trait Implementations§
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
§impl<T> Conv for T
impl<T> Conv for T
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> FmtForward for T
impl<T> FmtForward for T
§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.§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.§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.§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.§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.§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.§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.§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.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where &'a Self: for<'a> IntoIterator,
Formats each item in a sequence. Read more
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere T: ?Sized,
§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
§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 more§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 more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere Self: Borrow<B>, B: 'a + ?Sized, R: 'a,
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> Rwhere Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere Self: AsRef<U>, U: 'a + ?Sized, R: 'a,
Borrows
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere Self: AsMut<U>, U: 'a + ?Sized, R: 'a,
Mutably borrows
self
, then passes self.as_mut()
into the pipe
function.§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,
§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,
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere Self: Borrow<B>, B: ?Sized,
Immutable access to the
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere Self: BorrowMut<B>, B: ?Sized,
Mutable access to the
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere Self: AsRef<R>, R: ?Sized,
Immutable access to the
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere Self: AsMut<R>, R: ?Sized,
Mutable access to the
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere Self: Deref<Target = T>, T: ?Sized,
Immutable access to the
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere Self: DerefMut<Target = T> + Deref, T: ?Sized,
Mutable access to the
Deref::Target
of a value. Read more§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.§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.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere Self: Borrow<B>, B: ?Sized,
Calls
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere Self: BorrowMut<B>, B: ?Sized,
Calls
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere Self: AsRef<R>, R: ?Sized,
Calls
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere Self: AsMut<R>, R: ?Sized,
Calls
.tap_ref_mut()
only in debug builds, and is erased in release
builds.