pub struct RecordTooLargeError { /* private fields */ }Expand description
This record is larger than the maximum allowable size
§Translation notes
Error code Errors::MessageTooLarge.
Implementations§
Source§impl RecordTooLargeError
impl RecordTooLargeError
Sourcepub fn new(message: impl Into<String>) -> Self
pub fn new(message: impl Into<String>) -> Self
Creates the error with the given message and no partitions.
§Arguments
message- the error’s message
Sourcepub fn with_source(message: impl Into<String>, source: Error) -> Self
pub fn with_source(message: impl Into<String>, source: Error) -> Self
Creates the error with the given message and an underlying cause.
§Arguments
message- the error’s messagesource- the error’s cause
Sourcepub fn with_default_message() -> Self
pub fn with_default_message() -> Self
Creates the error with the default message of Errors::MessageTooLarge, as the broker’s
error code is turned into an error.
Sourcepub fn with_record_too_large_partitions(
message: impl Into<String>,
record_too_large_partitions: HashMap<TopicPartition, i64>,
) -> Self
pub fn with_record_too_large_partitions( message: impl Into<String>, record_too_large_partitions: HashMap<TopicPartition, i64>, ) -> Self
Creates the error naming the offending partitions.
§Arguments
message- the error’s messagerecord_too_large_partitions- the size of the too-large record of each partition
Sourcepub fn record_too_large_partitions(
&self,
) -> Option<&HashMap<TopicPartition, i64>>
pub fn record_too_large_partitions( &self, ) -> Option<&HashMap<TopicPartition, i64>>
Returns the per-partition record size that exceeded the limit, or None if not recorded.
Trait Implementations§
Source§impl Clone for RecordTooLargeError
impl Clone for RecordTooLargeError
Source§fn clone(&self) -> RecordTooLargeError
fn clone(&self) -> RecordTooLargeError
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 Debug for RecordTooLargeError
impl Debug for RecordTooLargeError
Source§impl Display for RecordTooLargeError
impl Display for RecordTooLargeError
Source§impl Error for RecordTooLargeError
impl Error for RecordTooLargeError
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 RecordTooLargeError
impl RefUnwindSafe for RecordTooLargeError
impl Send for RecordTooLargeError
impl Sync for RecordTooLargeError
impl Unpin for RecordTooLargeError
impl UnsafeUnpin for RecordTooLargeError
impl UnwindSafe for RecordTooLargeError
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