pub struct LogOutputLimit { /* private fields */ }Expand description
Maximum byte count for one bounded redacted log representation.
Implementations§
Source§impl LogOutputLimit
impl LogOutputLimit
Sourcepub const MINIMUM: usize
pub const MINIMUM: usize
Smallest valid limit, equal to the byte length of the truncation marker.
Sourcepub const fn new(max_bytes: usize) -> Result<Self, LogOutputLimitError>
pub const fn new(max_bytes: usize) -> Result<Self, LogOutputLimitError>
Validates a maximum output byte count.
§Parameters
max_bytes- Maximum rendered bytes, including any truncation marker.
§Returns
A validated output limit.
§Errors
Returns LogOutputLimitError when max_bytes cannot contain the
complete truncation marker.
Trait Implementations§
Source§impl Clone for LogOutputLimit
impl Clone for LogOutputLimit
Source§fn clone(&self) -> LogOutputLimit
fn clone(&self) -> LogOutputLimit
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 moreimpl Copy for LogOutputLimit
Source§impl Debug for LogOutputLimit
impl Debug for LogOutputLimit
impl Eq for LogOutputLimit
Source§impl From<DiagnosticBudget> for LogOutputLimit
impl From<DiagnosticBudget> for LogOutputLimit
Source§fn from(budget: DiagnosticBudget) -> Self
fn from(budget: DiagnosticBudget) -> Self
Converts a diagnostic budget into its compatible log-output limit.
DiagnosticBudget guarantees an output bound large enough for every
LogOutputLimit.
§Parameters
budget- Diagnostic budget whose output limit is converted.
§Returns
A compatible validated log-output limit.
Source§impl Hash for LogOutputLimit
impl Hash for LogOutputLimit
Source§impl PartialEq for LogOutputLimit
impl PartialEq for LogOutputLimit
impl StructuralPartialEq for LogOutputLimit
Auto Trait Implementations§
impl Freeze for LogOutputLimit
impl RefUnwindSafe for LogOutputLimit
impl Send for LogOutputLimit
impl Sync for LogOutputLimit
impl Unpin for LogOutputLimit
impl UnsafeUnpin for LogOutputLimit
impl UnwindSafe for LogOutputLimit
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