Struct Sourcepos

pub struct Sourcepos { pub start: LineColumn, pub end: LineColumn }

Represents the position in the source Markdown this node was rendered from.

Fields

start: LineColumn

The line and column of the first character of this node.

end: LineColumn

The line and column of the last character of this node.

Trait Implementations

impl Clone for Sourcepos

fn clone(&self) -> Sourcepos

impl Copy for Sourcepos

impl Debug for Sourcepos

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

impl Display for Sourcepos

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

impl Eq for Sourcepos

impl From<(LineColumn, LineColumn)> for Sourcepos

fn from((start, end): (LineColumn, LineColumn)) -> Sourcepos

impl From<(usize, usize, usize, usize)> for Sourcepos

fn from(sp: (usize, usize, usize, usize)) -> Sourcepos

impl Ord for Sourcepos

fn cmp(&self, other: &Sourcepos) -> Ordering

impl PartialEq for Sourcepos

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

impl PartialOrd for Sourcepos

fn partial_cmp(&self, other: &Sourcepos) -> Option<Ordering>

impl StructuralPartialEq for Sourcepos

Auto Trait Implementations

impl Freeze for Sourcepos

impl RefUnwindSafe for Sourcepos

impl Send for Sourcepos

impl Sync for Sourcepos

impl Unpin for Sourcepos

impl UnsafeUnpin for Sourcepos

impl UnwindSafe for Sourcepos

Blanket Implementations

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

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

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

impl<T> From<T> for Sourcepos

fn from(t: T) -> T

Returns the argument unchanged.

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

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

impl<T> ToString for Sourcepos where T: Display + ?Sized,

fn to_string(&self) -> String

impl<T, U> Into<U> for Sourcepos 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 Sourcepos where U: Into<T>,

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

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

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