pub struct DoubleSpan(pub Span, pub Span);Expand description
The real opening and closing boundaries of a paired delimiter.
A delimiter is two spelled tokens, not one span with an inferred width:
storing both is what makes Delimiter::opening_span and
Delimiter::closing_span plain field reads instead of arithmetic that
assumes the source layout. DoubleSpan(open, close) mirrors
proc_macro2’s open/close pair for a Group.
Tuple Fields§
§0: Span§1: SpanImplementations§
Trait Implementations§
Source§impl Clone for DoubleSpan
impl Clone for DoubleSpan
Source§fn clone(&self) -> DoubleSpan
fn clone(&self) -> DoubleSpan
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 DoubleSpan
impl Debug for DoubleSpan
Source§impl Default for DoubleSpan
impl Default for DoubleSpan
Source§fn default() -> DoubleSpan
fn default() -> DoubleSpan
Returns the “default value” for a type. Read more
impl Eq for DoubleSpan
Source§impl PartialEq for DoubleSpan
impl PartialEq for DoubleSpan
Source§impl Spanned for DoubleSpan
impl Spanned for DoubleSpan
impl StructuralPartialEq for DoubleSpan
Auto Trait Implementations§
impl Freeze for DoubleSpan
impl RefUnwindSafe for DoubleSpan
impl Send for DoubleSpan
impl Sync for DoubleSpan
impl Unpin for DoubleSpan
impl UnsafeUnpin for DoubleSpan
impl UnwindSafe for DoubleSpan
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