Struct cargo::ops::cargo_new::IgnoreList
source · struct IgnoreList {
ignore: Vec<String>,
hg_ignore: Vec<String>,
fossil_ignore: Vec<String>,
}
Expand description
IgnoreList
Fields§
§ignore: Vec<String>
git like formatted entries
hg_ignore: Vec<String>
mercurial formatted entries
fossil_ignore: Vec<String>
Fossil-formatted entries.
Implementations§
source§impl IgnoreList
impl IgnoreList
sourcefn new() -> IgnoreList
fn new() -> IgnoreList
constructor to build a new ignore file
sourcefn push(&mut self, ignore: &str, hg_ignore: &str, fossil_ignore: &str)
fn push(&mut self, ignore: &str, hg_ignore: &str, fossil_ignore: &str)
Add a new entry to the ignore list. Requires three arguments with the entry in possibly three different formats. One for “git style” entries, one for “mercurial style” entries and one for “fossil style” entries.
sourcefn format_new(&self, vcs: VersionControl) -> String
fn format_new(&self, vcs: VersionControl) -> String
Return the correctly formatted content of the ignore file for the given
version control system as String
.
sourcefn format_existing<T: BufRead>(
&self,
existing: T,
vcs: VersionControl,
) -> CargoResult<String>
fn format_existing<T: BufRead>( &self, existing: T, vcs: VersionControl, ) -> CargoResult<String>
format_existing is used to format the IgnoreList when the ignore file
already exists. It reads the contents of the given BufRead
and
checks if the contents of the ignore list are already existing in the
file.
Auto Trait Implementations§
impl Freeze for IgnoreList
impl RefUnwindSafe for IgnoreList
impl Send for IgnoreList
impl Sync for IgnoreList
impl Unpin for IgnoreList
impl UnwindSafe for IgnoreList
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 72 bytes