pub enum Error {
Show 22 variants
DeploySize(DeployExcessiveSizeError),
DeployBuild(DeployBuilderError),
TransactionBuild(TransactionV1BuilderError),
InvalidKeyVariant {
expected_variant: String,
actual: Key,
},
FailedToGetResponse {
rpc_id: JsonRpcId,
rpc_method: &'static str,
error: Error,
},
ResponseIsHttpError {
rpc_id: JsonRpcId,
rpc_method: &'static str,
error: Error,
},
FailedToParseResponse {
rpc_id: JsonRpcId,
rpc_method: &'static str,
error: Error,
},
ResponseIsRpcError {
rpc_id: JsonRpcId,
rpc_method: &'static str,
error: Error,
},
InvalidRpcResponse {
rpc_id: JsonRpcId,
rpc_method: &'static str,
response_kind: &'static str,
response: Value,
source: Option<Error>,
},
FailedToEncodeToJson {
context: &'static str,
error: Error,
},
FailedToDecodeFromJson {
context: &'static str,
error: Error,
},
FileAlreadyExists(PathBuf),
EmptyKeygenPath,
UnsupportedAlgorithm(String),
IoError {
context: String,
error: Error,
},
ToBytesError(Error),
CryptoError {
context: &'static str,
error: ErrorExt,
},
ResponseFailedValidation(ValidateResponseError),
Utf8Error {
context: &'static str,
error: Utf8Error,
},
ContractVerificationFailed,
FailedToConstructHttpClient,
FailedToParseNodeAddress,
}
Expand description
Errors that may be returned by casper_client
functions.
Variants§
DeploySize(DeployExcessiveSizeError)
Deploy
size too large.
DeployBuild(DeployBuilderError)
Failed to build Deploy
.
TransactionBuild(TransactionV1BuilderError)
Failed to build Transaction
InvalidKeyVariant
Invalid Key
variant.
FailedToGetResponse
Failed to get a response from the node.
Fields
ResponseIsHttpError
JSON-RPC error returned from the node.
Fields
FailedToParseResponse
Failed to parse the response.
Fields
ResponseIsRpcError
JSON-RPC error returned from the node.
Fields
InvalidRpcResponse
Invalid response returned from the node.
Fields
FailedToEncodeToJson
Failed to encode to JSON.
Fields
FailedToDecodeFromJson
Failed to decode from JSON.
Fields
FileAlreadyExists(PathBuf)
Failed to create new file because it already exists.
EmptyKeygenPath
Empty path provided as output dir for keygen.
UnsupportedAlgorithm(String)
Unsupported keygen algorithm.
IoError
Context-adding wrapper for std::io::Error
.
Fields
ToBytesError(Error)
Failed to serialize to bytes.
CryptoError
Cryptographic error.
Fields
ResponseFailedValidation(ValidateResponseError)
Failed to validate response.
Utf8Error
An error that occurs when attempting to use a non UTF-8 string for a transaction.
Fields
ContractVerificationFailed
Failed to verify contract.
FailedToConstructHttpClient
Failed to construct HTTP client.
FailedToParseNodeAddress
Failed to parse provided node address as URL.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<DeployBuilderError> for Error
impl From<DeployBuilderError> for Error
Source§fn from(source: DeployBuilderError) -> Self
fn from(source: DeployBuilderError) -> Self
Source§impl From<ExcessiveSizeError> for Error
impl From<ExcessiveSizeError> for Error
Source§fn from(source: DeployExcessiveSizeError) -> Self
fn from(source: DeployExcessiveSizeError) -> Self
Source§impl From<Error> for Error
impl From<Error> for Error
Source§fn from(error: ToBytesError) -> Self
fn from(error: ToBytesError) -> Self
Source§impl From<TransactionV1BuilderError> for Error
impl From<TransactionV1BuilderError> for Error
Source§fn from(source: TransactionV1BuilderError) -> Self
fn from(source: TransactionV1BuilderError) -> Self
Source§impl From<ValidateResponseError> for Error
impl From<ValidateResponseError> for Error
Source§fn from(source: ValidateResponseError) -> Self
fn from(source: ValidateResponseError) -> Self
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more