pub struct ConsumerOffsetOutOfRangeError { /* private fields */ }Expand description
No reset policy has been defined, and the offsets for these partitions are either larger or smaller than the range of offsets the server has for the given partition.
Implementations§
Source§impl ConsumerOffsetOutOfRangeError
impl ConsumerOffsetOutOfRangeError
Sourcepub fn new(offset_out_of_range_partitions: HashMap<TopicPartition, i64>) -> Self
pub fn new(offset_out_of_range_partitions: HashMap<TopicPartition, i64>) -> Self
Constructs a new ConsumerOffsetOutOfRangeError with the offsets that
are out of range.
§Arguments
offset_out_of_range_partitions- Map of partition to the out-of-range offset
Sourcepub fn with_message(
message: impl Into<String>,
offset_out_of_range_partitions: HashMap<TopicPartition, i64>,
) -> Self
pub fn with_message( message: impl Into<String>, offset_out_of_range_partitions: HashMap<TopicPartition, i64>, ) -> Self
Constructs a new ConsumerOffsetOutOfRangeError with a custom message.
§Arguments
message- The detail messageoffset_out_of_range_partitions- Map of partition to the out-of-range offset
Sourcepub fn offset_out_of_range_partitions(&self) -> &HashMap<TopicPartition, i64>
pub fn offset_out_of_range_partitions(&self) -> &HashMap<TopicPartition, i64>
Get a map of the topic partitions and the respective out-of-range fetch offsets.
§Returns
The out-of-range fetch offset per partition
Sourcepub fn partitions(&self) -> impl Iterator<Item = &TopicPartition>
pub fn partitions(&self) -> impl Iterator<Item = &TopicPartition>
Trait Implementations§
Source§impl Clone for ConsumerOffsetOutOfRangeError
impl Clone for ConsumerOffsetOutOfRangeError
Source§fn clone(&self) -> ConsumerOffsetOutOfRangeError
fn clone(&self) -> ConsumerOffsetOutOfRangeError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Error for ConsumerOffsetOutOfRangeError
impl Error for ConsumerOffsetOutOfRangeError
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()
Auto Trait Implementations§
impl Freeze for ConsumerOffsetOutOfRangeError
impl RefUnwindSafe for ConsumerOffsetOutOfRangeError
impl Send for ConsumerOffsetOutOfRangeError
impl Sync for ConsumerOffsetOutOfRangeError
impl Unpin for ConsumerOffsetOutOfRangeError
impl UnsafeUnpin for ConsumerOffsetOutOfRangeError
impl UnwindSafe for ConsumerOffsetOutOfRangeError
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