pub struct NumBytes(/* private fields */);Expand description
A wrapper type representing a number of bytes.
Use the NumBytesExt trait to conveniently create instances:
use tokio_process_tools::NumBytesExt;
let kb = 16.kilobytes();
let mb = 2.megabytes();Implementations§
Source§impl NumBytes
impl NumBytes
Sourcepub const MAX: NumBytes
pub const MAX: NumBytes
The largest representable byte count (usize::MAX).
Use this when an API requires an explicit byte limit but you don’t actually want to cap
it — for example, line-parsing options that require a non-zero max_line_length but you
trust the source to produce reasonable lines.
Trait Implementations§
impl Copy for NumBytes
impl Eq for NumBytes
impl StructuralPartialEq for NumBytes
Auto Trait Implementations§
impl Freeze for NumBytes
impl RefUnwindSafe for NumBytes
impl Send for NumBytes
impl Sync for NumBytes
impl Unpin for NumBytes
impl UnsafeUnpin for NumBytes
impl UnwindSafe for NumBytes
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