pub struct FileMessage { /* private fields */ }Expand description
A delivery from a stream file: the transport’s SeaMessage plus the subscription’s
reposition handle.
The handle is what makes the file transport’s per-delivery context
(FileContext) buildable, and carrying it in the message type is what
keeps that context off the transports that cannot seek: standard input yields a plain
SeaMessage, so a handler declaring the seeking context does not compile against it.
Implementations§
Trait Implementations§
Source§impl BuildBatchContext<FileMessage> for FileBatchContext
impl BuildBatchContext<FileMessage> for FileBatchContext
Source§fn build(first: &FileMessage) -> Self
fn build(first: &FileMessage) -> Self
Builds the context value by reading subscription-scoped fields out of the batch’s first
delivery, or out of the batch itself where it lends its values as one slice.
Source§impl BuildContext<FileMessage> for FileContext
impl BuildContext<FileMessage> for FileContext
Source§fn build(msg: &FileMessage) -> Self
fn build(msg: &FileMessage) -> Self
Builds the context value by reading fields out of
msg.Source§impl Debug for FileMessage
impl Debug for FileMessage
Source§impl IncomingMessage for FileMessage
impl IncomingMessage for FileMessage
Source§fn ack(self) -> impl Future<Output = Result<(), AckError>>
fn ack(self) -> impl Future<Output = Result<(), AckError>>
Acknowledges successful processing. Consumes the message handle. Read more
Source§fn nack(self, requeue: bool) -> impl Future<Output = Result<(), AckError>>
fn nack(self, requeue: bool) -> impl Future<Output = Result<(), AckError>>
Negatively acknowledges the message. When
requeue is true the broker should
redeliver according to its own retry policy; when false it should drop or dead-letter
the message. Read moreSource§fn partition_key(&self) -> Option<&[u8]>
fn partition_key(&self) -> Option<&[u8]>
Returns the routing key the broker partitioned this message by, or
None when the
message carries no key. Read moreSource§fn redelivery_count(&self) -> Option<u64>
fn redelivery_count(&self) -> Option<u64>
How many times the broker has delivered this message, counting this delivery.
None
where the transport counts nothing. Read moreSource§fn decode_error(&self) -> Option<&CodecError>
fn decode_error(&self) -> Option<&CodecError>
The error the broker met while reading this delivery, or
None when it read the delivery
whole. Read moreSource§fn supports_nack_after(&self) -> bool
fn supports_nack_after(&self) -> bool
Reports whether this transport can honor
nack_after natively. Read moreSource§impl Positioned for FileMessage
impl Positioned for FileMessage
Source§type Position = FilePosition
type Position = FilePosition
The position type, matching the subscription’s
Seeker::Position.Source§fn position(&self) -> FilePosition
fn position(&self) -> FilePosition
Returns the position of this delivery; seeking to it redelivers this message.
Auto Trait Implementations§
impl !Freeze for FileMessage
impl !RefUnwindSafe for FileMessage
impl !UnwindSafe for FileMessage
impl Send for FileMessage
impl Sync for FileMessage
impl Unpin for FileMessage
impl UnsafeUnpin for FileMessage
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more