pub enum BundlerError {
ParseError {
message: String,
},
InvalidVersionSpecifier {
specifier: String,
message: String,
},
PackageNotFound {
package: String,
},
RegistryError {
package: String,
source: Box<dyn Error + Send + Sync>,
},
ApiResponseError {
package: String,
source: Error,
},
InvalidStructure {
message: String,
},
InvalidUri {
uri: String,
},
CacheError(String),
Io(Error),
Other(Box<dyn Error + Send + Sync>),
}Expand description
Errors specific to Bundler/Ruby dependency handling.
Variants§
ParseError
Failed to parse Gemfile
InvalidVersionSpecifier
Invalid version specifier
PackageNotFound
Package not found on rubygems.org
RegistryError
rubygems.org registry request failed
ApiResponseError
Failed to deserialize rubygems API response
InvalidStructure
Invalid Gemfile structure
InvalidUri
Invalid file URI
CacheError(String)
Cache error
Io(Error)
I/O error
Other(Box<dyn Error + Send + Sync>)
Generic error wrapper
Implementations§
Source§impl BundlerError
impl BundlerError
Sourcepub fn registry_error(
package: impl Into<String>,
error: impl Error + Send + Sync + 'static,
) -> Self
pub fn registry_error( package: impl Into<String>, error: impl Error + Send + Sync + 'static, ) -> Self
Create a registry error from any error type.
Sourcepub fn api_response_error(package: impl Into<String>, error: Error) -> Self
pub fn api_response_error(package: impl Into<String>, error: Error) -> Self
Create an API response error.
Sourcepub fn invalid_structure(message: impl Into<String>) -> Self
pub fn invalid_structure(message: impl Into<String>) -> Self
Create an invalid structure error.
Sourcepub fn invalid_version_specifier(
specifier: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn invalid_version_specifier( specifier: impl Into<String>, message: impl Into<String>, ) -> Self
Create an invalid version specifier error.
Sourcepub fn invalid_uri(uri: impl Into<String>) -> Self
pub fn invalid_uri(uri: impl Into<String>) -> Self
Create an invalid URI error.
Trait Implementations§
Source§impl Debug for BundlerError
impl Debug for BundlerError
Source§impl Display for BundlerError
impl Display for BundlerError
Source§impl Error for BundlerError
impl Error for BundlerError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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<BundlerError> for DepsError
impl From<BundlerError> for DepsError
Source§fn from(err: BundlerError) -> Self
fn from(err: BundlerError) -> Self
Converts to this type from the input type.
Source§impl From<DepsError> for BundlerError
impl From<DepsError> for BundlerError
Auto Trait Implementations§
impl Freeze for BundlerError
impl !RefUnwindSafe for BundlerError
impl Send for BundlerError
impl Sync for BundlerError
impl Unpin for BundlerError
impl UnsafeUnpin for BundlerError
impl !UnwindSafe for BundlerError
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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.