pub struct ResourceNotFoundError { /* private fields */ }Expand description
A request referred to a resource that does not exist.
Corresponds to Java’s ResourceNotFoundException, error code Errors::ResourceNotFound.
Java extends chain:
ResourceNotFoundException -> ApiException -> KafkaException
Hand-written rather than declared with kafka_error_type! because it
carries Java’s resource field and resource() accessor.
Implementations§
Source§impl ResourceNotFoundError
impl ResourceNotFoundError
Sourcepub fn new(message: impl Into<String>) -> Self
pub fn new(message: impl Into<String>) -> Self
Create the error with the given message and no resource — Java’s
ResourceNotFoundException(String message).
The three translated constructors intersect on {message}, which is
exactly this one — so it keeps the plain name and the other two are
suffixed with their parameters beyond the intersection (CLAUDE.md §2).
Sourcepub fn with_default_message() -> Self
pub fn with_default_message() -> Self
Create the error with the code’s default message — used by
Errors::error.
Sourcepub fn with_resource(
resource: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn with_resource( resource: impl Into<String>, message: impl Into<String>, ) -> Self
Create the error naming the offending resource — Java’s
ResourceNotFoundException(String resource, String message).
Suffixed per new.
Sourcepub fn with_resource_source(
resource: impl Into<String>,
message: impl Into<String>,
source: Error,
) -> Self
pub fn with_resource_source( resource: impl Into<String>, message: impl Into<String>, source: Error, ) -> Self
Create the error with a resource, message, and underlying cause,
mirroring Java’s ResourceNotFoundException(String resource, String message, Throwable cause).
Suffixed per new.
Trait Implementations§
Source§impl Clone for ResourceNotFoundError
impl Clone for ResourceNotFoundError
Source§fn clone(&self) -> ResourceNotFoundError
fn clone(&self) -> ResourceNotFoundError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more