[][src]Struct getline::linespec::LineSpec

pub struct LineSpec { /* fields omitted */ }

Implementations

impl LineSpec[src]

Represents a line range specification

Examples

assert!(LineSpec::from_spec("3:5").is_ok());
assert!(LineSpec::from_spec("5:3").is_err());
assert!(LineSpec::from_spec("0:5").is_err());

let line_spec = LineSpec::from_spec("3:5").unwrap();
assert!(!line_spec.line_in(2));
assert!(line_spec.line_in(3));
assert!(line_spec.line_in(4));
assert!(line_spec.line_in(5));
assert!(!line_spec.line_in(6));

pub fn from_spec(spec: &str) -> ResultStrErr<Self>[src]

pub fn line_in(&self, line_number: u32) -> bool[src]

Trait Implementations

impl Debug for LineSpec[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.