pub struct LineRange { /* private fields */ }Expand description
Lines start to end of a file, 1-based and inclusive; end absent
means to the end of the file.
Written "110-300", or "110-" to the end. Read leniently, as models
and people write ranges: "110..300", "110–300", "L110-L300",
"lines 110-300", "-300" (from the first line), "110" (that line
alone), or a bare number. Validated: lines are numbered from 1, and a
range cannot end before it starts.
Implementations§
Source§impl LineRange
impl LineRange
Sourcepub const FORM: &'static str = "Write a range of lines as \"<from>-<to>\" \
(1-based, both included, e.g. \"110-300\"), or \"<from>-\" to read to \
the end of the file."
pub const FORM: &'static str = "Write a range of lines as \"<from>-<to>\" \ (1-based, both included, e.g. \"110-300\"), or \"<from>-\" to read to \ the end of the file."
How a range is written, for error messages
Sourcepub const INVALID: &'static str = "Invalid arguments at `lines`: "
pub const INVALID: &'static str = "Invalid arguments at `lines`: "
How a refused range opens, as the seed runner shows a malformed
lines argument, so that every range error reads alike (0.105.0)
Trait Implementations§
impl Copy for LineRange
Source§impl<'de> Deserialize<'de> for LineRange
A string, or a bare number for one line
impl<'de> Deserialize<'de> for LineRange
A string, or a bare number for one line
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for LineRange
impl StructuralPartialEq for LineRange
Auto Trait Implementations§
impl Freeze for LineRange
impl RefUnwindSafe for LineRange
impl Send for LineRange
impl Sync for LineRange
impl Unpin for LineRange
impl UnsafeUnpin for LineRange
impl UnwindSafe for LineRange
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T, O> Matches<O> for Twhere
T: PartialEq<O>,
impl<T, O> Matches<O> for Twhere
T: PartialEq<O>,
fn validate_matches(&self, other: &O) -> bool
impl<T> PendingHandle for Twhere
T: Send + 'static,
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more