pub struct LocalTimeoutError { /* private fields */ }Expand description
A wait on a future timed out.
Corresponds to Java’s java.util.concurrent.TimeoutException, thrown by
Future.get(timeout, unit) — not to
org.apache.kafka.common.errors.TimeoutException, which is a
RetriableException under KafkaException and is spelled
Error::timeout. The two are unrelated
classes that share a simple name; conflating them makes a local await
timeout answer true to is_retriable_error() / is_api_error() /
is_kafka_error() and report a wire code, none of which Java does. A
plain checked java.util class outside the Kafka hierarchy, so no
predicate holds.
The Local prefix marks this as a JDK class rather than a Kafka one, per
CLAUDE.md §2 — every java.* error carries it, independently of the
subpackage. That is what separates this from
Error::Timeout: Java tells the two
TimeoutExceptions apart by package, and a flat enum cannot, so the
prefix carries what the package used to. It also says something the
package name would not: these errors are raised here, never reported by
a broker, which is why none of them has a wire code.
Implementations§
Source§impl LocalTimeoutError
impl LocalTimeoutError
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 cause,
mirroring the (String message) constructor.
Keeps the plain name under CLAUDE.md §2, for consistency with
kafka_error_type! — see the note on this macro about the
constructors these classes deliberately do not model.
(Deliberately not an intra-doc link: this doc comment expands
into each declaring module, where that macro is not in scope.)
Trait Implementations§
Source§impl Clone for LocalTimeoutError
impl Clone for LocalTimeoutError
Source§fn clone(&self) -> LocalTimeoutError
fn clone(&self) -> LocalTimeoutError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more