[−][src]Struct getline::linespec::LineSpec
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
Auto Trait Implementations
impl RefUnwindSafe for LineSpec
impl Send for LineSpec
impl Sync for LineSpec
impl Unpin for LineSpec
impl UnwindSafe for LineSpec
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,