pub struct DockerIgnoreRule { /* private fields */ }Expand description
A classified .dockerignore rule.
Implementations§
Source§impl DockerIgnoreRule
impl DockerIgnoreRule
Sourcepub fn parse(
value: impl AsRef<str>,
) -> Result<DockerIgnoreRule, DockerIgnoreParseError>
pub fn parse( value: impl AsRef<str>, ) -> Result<DockerIgnoreRule, DockerIgnoreParseError>
Parses a .dockerignore-style line.
Sourcepub const fn pattern(&self) -> Option<&DockerIgnorePattern>
pub const fn pattern(&self) -> Option<&DockerIgnorePattern>
Returns the pattern when this is a pattern-bearing rule.
Sourcepub const fn negation(&self) -> DockerIgnoreNegation
pub const fn negation(&self) -> DockerIgnoreNegation
Returns the negation marker.
Sourcepub const fn scope(&self) -> DockerIgnoreScope
pub const fn scope(&self) -> DockerIgnoreScope
Returns the rule scope.
Sourcepub const fn is_comment(&self) -> bool
pub const fn is_comment(&self) -> bool
Returns true when this is a comment line.
Sourcepub const fn is_directory_only(&self) -> bool
pub const fn is_directory_only(&self) -> bool
Returns true when the rule carries a directory-only pattern.
Trait Implementations§
Source§impl Clone for DockerIgnoreRule
impl Clone for DockerIgnoreRule
Source§fn clone(&self) -> DockerIgnoreRule
fn clone(&self) -> DockerIgnoreRule
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 moreSource§impl Debug for DockerIgnoreRule
impl Debug for DockerIgnoreRule
Source§impl PartialEq for DockerIgnoreRule
impl PartialEq for DockerIgnoreRule
Source§fn eq(&self, other: &DockerIgnoreRule) -> bool
fn eq(&self, other: &DockerIgnoreRule) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for DockerIgnoreRule
impl StructuralPartialEq for DockerIgnoreRule
Auto Trait Implementations§
impl Freeze for DockerIgnoreRule
impl RefUnwindSafe for DockerIgnoreRule
impl Send for DockerIgnoreRule
impl Sync for DockerIgnoreRule
impl Unpin for DockerIgnoreRule
impl UnsafeUnpin for DockerIgnoreRule
impl UnwindSafe for DockerIgnoreRule
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