Struct rustfmt_nightly::config::file_lines::FileLines
[−]
[src]
pub struct FileLines(_);
A set of lines in files.
It is represented as a multimap keyed on file names, with values a collection of
non-overlapping ranges sorted by their start point. An inner None is interpreted to mean all
lines in all files.
Methods
impl FileLines[src]
pub fn all() -> FileLines[src]
Creates a FileLines that contains all lines in all files.
pub fn is_all(&self) -> bool[src]
Returns true if this FileLines contains all lines in all files.
pub fn from_ranges(ranges: HashMap<FileName, Vec<Range>>) -> FileLines[src]
ⓘImportant traits for Files<'a>pub fn files(&self) -> Files[src]
Returns an iterator over the files contained in self.
pub fn contains(&self, range: &LineRange) -> bool[src]
Returns true if range is fully contained in self.
pub fn intersects(&self, range: &LineRange) -> bool[src]
Returns true if any lines in range are in self.
pub fn contains_line(&self, file_name: &FileName, line: usize) -> bool[src]
Returns true if line from file_name is in self.
pub fn intersects_range(
&self,
file_name: &FileName,
lo: usize,
hi: usize
) -> bool[src]
&self,
file_name: &FileName,
lo: usize,
hi: usize
) -> bool
Returns true if any of the lines between lo and hi from file_name are in self.
Trait Implementations
impl Clone for FileLines[src]
fn clone(&self) -> FileLines[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Debug for FileLines[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl Default for FileLines[src]
impl FromStr for FileLines[src]
type Err = String
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<FileLines, String>[src]
Parses a string s to return a value of this type. Read more
impl<'de> Deserialize<'de> for FileLines[src]
fn deserialize<D>(_: D) -> Result<Self, D::Error> where
D: Deserializer<'de>, [src]
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more