pub struct Gate { /* private fields */ }Expand description
The install-time gate: an optional glob AND an optional size predicate. A file
matches only if BOTH present predicates pass (an absent half is vacuously true).
Gate::default() is the fleet default — glob **/*.node, no size floor.
Implementations§
Source§impl Gate
impl Gate
Sourcepub fn any() -> Self
pub fn any() -> Self
A gate that matches everything (no glob, no size floor). Useful when the caller has already selected the file and just wants the one-pass writer.
Sourcepub fn new(
glob: Option<&str>,
size: Option<&str>,
) -> Result<Gate, GateParseError>
pub fn new( glob: Option<&str>, size: Option<&str>, ) -> Result<Gate, GateParseError>
Build a gate from an optional glob and an optional size-predicate string. A
None glob matches any name; a None/empty size string applies no floor.
Sourcepub fn with_size(self, size: SizePredicate) -> Self
pub fn with_size(self, size: SizePredicate) -> Self
Replace the size predicate (chainable builder).
Sourcepub fn size(&self) -> Option<SizePredicate>
pub fn size(&self) -> Option<SizePredicate>
The size predicate, if any.
Trait Implementations§
impl Eq for Gate
impl StructuralPartialEq for Gate
Auto Trait Implementations§
impl Freeze for Gate
impl RefUnwindSafe for Gate
impl Send for Gate
impl Sync for Gate
impl Unpin for Gate
impl UnsafeUnpin for Gate
impl UnwindSafe for Gate
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