Enum spinoso_env::Error
source · pub enum Error {
Argument(ArgumentError),
Invalid(InvalidError),
}
Expand description
Sum type of all errors possibly returned from get
, put
, and
to_map
.
These APIs can return errors under several conditions:
- An environment variable name is not convertible to a platform string.
- An environment variable value is not convertible to a platform string.
- An environment variable name contains a NUL byte.
- An environment variable name contains an
=
byte. - An environment variable value contains a NUL byte.
Ruby represents these error conditions with different exception types.
Variants§
Argument(ArgumentError)
Error that indicates an argument parsing or value logic error occurred.
See ArgumentError
.
Invalid(InvalidError)
Error that indicates the access to the underlying platform APIs failed.
This error type corresponds to the EINVAL
syscall error.
See InvalidError
.
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)>
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<ArgumentError> for Error
impl From<ArgumentError> for Error
source§fn from(err: ArgumentError) -> Self
fn from(err: ArgumentError) -> Self
Converts to this type from the input type.
source§impl From<ConvertBytesError> for Error
impl From<ConvertBytesError> for Error
source§fn from(err: ConvertBytesError) -> Self
fn from(err: ConvertBytesError) -> Self
Converts to this type from the input type.
source§impl From<InvalidError> for Error
impl From<InvalidError> for Error
source§fn from(err: InvalidError) -> Self
fn from(err: InvalidError) -> Self
Converts to this type from the input type.
source§impl Ord for Error
impl Ord for Error
source§impl PartialEq<Error> for Error
impl PartialEq<Error> for Error
source§impl PartialOrd<Error> for Error
impl PartialOrd<Error> for Error
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more