Skip to main content

FastPublishErrorKind

Enum FastPublishErrorKind 

Source
#[non_exhaustive]
pub enum FastPublishErrorKind {
Show 17 variants NotEnabled, InvalidPattern, InvalidBatchId, UnknownBatchId, TooManyInflight, GapDetected, FlowError, EmptyBatch, InvalidInboxShape, InvalidConfig, Closed, Timeout, Subscribe, Publish, Serialization, InvalidState, Other,
}
Expand description

Kinds of errors that can occur during fast-ingest batch publishing.

API error codes are verified against nats-server 2.14 errors.json.

Marked #[non_exhaustive] — adding a new variant in a future release will not be a breaking change. Match on _ for forward compatibility.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

NotEnabled

Stream does not have allow_batched: true. (BATCH_PUBLISH_DISABLED, 10205)

§

InvalidPattern

Reply subject pattern rejected by the server. (BATCH_PUBLISH_INVALID_PATTERN, 10206)

§

InvalidBatchId

Batch id exceeds 64 characters or is otherwise invalid. (BATCH_PUBLISH_INVALID_BATCH_ID, 10207)

§

UnknownBatchId

Server has forgotten this batch (timed out, leader change in GapMode::Fail, etc.). (BATCH_PUBLISH_UNKNOWN_BATCH_ID, 10208)

§

TooManyInflight

Too many in-flight fast batches on the server. (BATCH_PUBLISH_TOO_MANY_INFLIGHT, 10211)

§

GapDetected

A gap was detected while running in GapMode::Fail. The final ack will indicate which messages were persisted.

§

FlowError

Any other server-side error reported via a BatchFlowErr message.

§

EmptyBatch

close() was called on a publisher that has not received any adds.

§

InvalidInboxShape

build() rejected the inbox because it does not have exactly two tokens. The reply-subject parser requires <prefix>.<id> shape.

§

InvalidConfig

build() rejected a configuration value (e.g. max_outstanding_acks outside 1..=3).

§

Closed

Called a method on a publisher that has already committed, closed, or failed fatally.

§

Timeout

Timed out waiting for a flow ack or final pub ack.

§

Subscribe

Failed to subscribe to the batch inbox.

§

Publish

Failed to publish a batch message.

§

Serialization

Failed to parse a server response.

§

InvalidState

An internal operation that depends on a runtime invariant was called before that invariant held — currently only emitted when the publisher would need to send a ping but no message has been published yet, so there is no first-subject to address the ping to.

§

Other

Catch-all.

Trait Implementations§

Source§

impl Clone for FastPublishErrorKind

Source§

fn clone(&self) -> FastPublishErrorKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FastPublishErrorKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for FastPublishErrorKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for FastPublishErrorKind

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for FastPublishErrorKind

Source§

fn eq(&self, other: &FastPublishErrorKind) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for FastPublishErrorKind

Source§

impl Eq for FastPublishErrorKind

Source§

impl StructuralPartialEq for FastPublishErrorKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more