pub struct UnzipSelection { /* private fields */ }Expand description
ZIP entry selection patterns for unzip APIs.
When no patterns are configured, unzip operations process every supported ZIP
entry. Patterns are matched against normalized ZIP paths, not local
filesystem paths or destination S3 keys. Use
UnzipSelection::new/UnzipSelection::include for builder-style
configuration, or pass an array such as ["docs/**", "!docs/drafts/**"]
to with_selection.
Implementations§
Source§impl UnzipSelection
impl UnzipSelection
Sourcepub fn patterns(patterns: impl IntoIterator<Item = impl Into<String>>) -> Self
pub fn patterns(patterns: impl IntoIterator<Item = impl Into<String>>) -> Self
Creates a selection from ordered include/exclude patterns.
Patterns use gitignore-style matching. Later patterns override earlier
patterns, and patterns prefixed with ! exclude matching ZIP paths.
If only exclude patterns are configured, every non-excluded ZIP path is
selected.
Sourcepub fn include(self, pattern: impl Into<String>) -> Self
pub fn include(self, pattern: impl Into<String>) -> Self
Adds an include pattern.
Leading ! and # characters are treated as literal path characters
in the builder API. Use Self::patterns for raw selection lines.
Sourcepub fn exclude(self, pattern: impl Into<String>) -> Self
pub fn exclude(self, pattern: impl Into<String>) -> Self
Adds an exclude pattern.
Leading ! and # characters are treated as literal path characters
in the builder API. Use Self::patterns for raw selection lines.
Sourcepub fn as_patterns(&self) -> &[String]
pub fn as_patterns(&self) -> &[String]
Returns the ordered selection patterns.
Trait Implementations§
Source§impl Clone for UnzipSelection
impl Clone for UnzipSelection
Source§fn clone(&self) -> UnzipSelection
fn clone(&self) -> UnzipSelection
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for UnzipSelection
impl Debug for UnzipSelection
Source§impl Default for UnzipSelection
impl Default for UnzipSelection
Source§fn default() -> UnzipSelection
fn default() -> UnzipSelection
Source§impl PartialEq for UnzipSelection
impl PartialEq for UnzipSelection
impl Eq for UnzipSelection
impl StructuralPartialEq for UnzipSelection
Auto Trait Implementations§
impl Freeze for UnzipSelection
impl RefUnwindSafe for UnzipSelection
impl Send for UnzipSelection
impl Sync for UnzipSelection
impl Unpin for UnzipSelection
impl UnsafeUnpin for UnzipSelection
impl UnwindSafe for UnzipSelection
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more