Struct Comment

pub struct Comment { pub span: Span, pub comment: String }

A comment from a regular expression with an associated span.

A regular expression can only contain comments when the x flag is enabled.

Fields

span: Span

The span of this comment, including the beginning # and ending \n.

comment: String

The comment text, starting with the first character following the # and ending with the last character preceding the \n.

Trait Implementations

impl Clone for Comment

fn clone(&self) -> Self

impl Debug for Comment

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Eq for Comment

impl PartialEq for Comment

fn eq(&self, other: &Self) -> bool

impl StructuralPartialEq for Comment

Auto Trait Implementations

impl Freeze for Comment

impl RefUnwindSafe for Comment

impl Send for Comment

impl Sync for Comment

impl Unpin for Comment

impl UnsafeUnpin for Comment

impl UnwindSafe for Comment

Blanket Implementations

impl<T> Any for Comment where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Comment where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Comment where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for Comment where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for Comment

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for Comment where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for Comment where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for Comment where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for Comment where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>