pub struct SizeRange { /* private fields */ }Expand description
A half-open range of file sizes in bytes.
The lower bound is inclusive and the upper bound is exclusive. File sizes are logical lengths reported by filesystem metadata.
Implementations§
Source§impl SizeRange
impl SizeRange
Sourcepub fn new(at_least: Option<u64>, below: Option<u64>) -> Result<Self>
pub fn new(at_least: Option<u64>, below: Option<u64>) -> Result<Self>
Constructs a size range with at least one bound.
Returns a crate::ValidationError if both bounds are absent, the exclusive
upper bound is zero, or the lower bound is greater than or equal to the upper bound.
Trait Implementations§
impl Eq for SizeRange
impl StructuralPartialEq for SizeRange
Auto Trait Implementations§
impl Forget for SizeRange
impl Freeze for SizeRange
impl Move for SizeRange
impl RefUnwindSafe for SizeRange
impl Send for SizeRange
impl Sync for SizeRange
impl Unpin for SizeRange
impl UnsafeUnpin for SizeRange
impl UnwindSafe for SizeRange
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