pub enum GroupInfraError {
Internal {
message: String,
},
ProtoDecode {
field: String,
},
ColdBackpressure {
stream_id: BucketStreamId,
before_group_hot_bytes: u64,
after_group_hot_bytes: u64,
limit: u64,
},
RaftUncommittedBackpressure {
current: u64,
incoming: u64,
limit: u64,
},
}Expand description
Infra error variants with structured fields render their human message on
demand (message) instead of storing a denormalized copy alongside the
fields. Internal is the exception: it carries free-form text with no
structured source, so it keeps an owned message.
Variants§
Implementations§
Source§impl GroupInfraError
impl GroupInfraError
pub fn internal(message: impl Into<String>) -> Self
pub fn proto_decode(field: impl Into<String>) -> Self
pub fn cold_backpressure( stream_id: BucketStreamId, before_group_hot_bytes: u64, after_group_hot_bytes: u64, limit: u64, ) -> Self
pub fn raft_uncommitted_backpressure( current: u64, incoming: u64, limit: u64, ) -> Self
pub fn message(&self) -> Cow<'_, str>
pub fn is_cold_backpressure(&self) -> bool
pub fn is_backpressure(&self) -> bool
Trait Implementations§
Source§impl Clone for GroupInfraError
impl Clone for GroupInfraError
Source§fn clone(&self) -> GroupInfraError
fn clone(&self) -> GroupInfraError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 GroupInfraError
impl Debug for GroupInfraError
Source§impl<'de> Deserialize<'de> for GroupInfraError
impl<'de> Deserialize<'de> for GroupInfraError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for GroupInfraError
impl Display for GroupInfraError
impl Eq for GroupInfraError
Source§impl Error for GroupInfraError
impl Error for GroupInfraError
1.30.0 · 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()
Source§impl PartialEq for GroupInfraError
impl PartialEq for GroupInfraError
Source§impl Serialize for GroupInfraError
impl Serialize for GroupInfraError
impl StructuralPartialEq for GroupInfraError
Auto Trait Implementations§
impl Freeze for GroupInfraError
impl RefUnwindSafe for GroupInfraError
impl Send for GroupInfraError
impl Sync for GroupInfraError
impl Unpin for GroupInfraError
impl UnsafeUnpin for GroupInfraError
impl UnwindSafe for GroupInfraError
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