pub struct PatternRange {
pub start_pattern: String,
pub end_pattern: String,
}Expand description
A pattern-addressed region, like sed’s /start/,/end/.
Both patterns are regexes. A region opens on a line matching
start_pattern and closes on the next subsequent line matching
end_pattern (both boundary lines are inside the region; the end
pattern is never tested against the line that opened the region, so
/a/,/a/ spans from one a to the next one — sed semantics).
Multiple regions are supported; an unclosed region extends to EOF.
Fields§
§start_pattern: String§end_pattern: StringTrait Implementations§
Source§impl Clone for PatternRange
impl Clone for PatternRange
Source§fn clone(&self) -> PatternRange
fn clone(&self) -> PatternRange
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PatternRange
impl Debug for PatternRange
Source§impl<'de> Deserialize<'de> for PatternRange
impl<'de> Deserialize<'de> for PatternRange
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PatternRange
Source§impl PartialEq for PatternRange
impl PartialEq for PatternRange
Source§fn eq(&self, other: &PatternRange) -> bool
fn eq(&self, other: &PatternRange) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PatternRange
impl Serialize for PatternRange
impl StructuralPartialEq for PatternRange
Auto Trait Implementations§
impl Freeze for PatternRange
impl RefUnwindSafe for PatternRange
impl Send for PatternRange
impl Sync for PatternRange
impl Unpin for PatternRange
impl UnsafeUnpin for PatternRange
impl UnwindSafe for PatternRange
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