Struct deno_ast::StartSourcePos
source · pub struct StartSourcePos(/* private fields */);
Expand description
A special source pos that indicates the source start which functions can use as a parameter type in order to ensure someone doesn’t provide the wrong position.
Implementations§
source§impl StartSourcePos
impl StartSourcePos
sourcepub const START_SOURCE_POS: StartSourcePos = _
pub const START_SOURCE_POS: StartSourcePos = _
Use this value as the start byte position when parsing.
pub fn as_byte_pos(&self) -> BytePos
pub fn as_source_pos(&self) -> SourcePos
Trait Implementations§
source§impl Add<usize> for StartSourcePos
impl Add<usize> for StartSourcePos
source§impl Clone for StartSourcePos
impl Clone for StartSourcePos
source§fn clone(&self) -> StartSourcePos
fn clone(&self) -> StartSourcePos
Returns a copy of the value. Read more
1.0.0 · 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 StartSourcePos
impl Debug for StartSourcePos
source§impl Display for StartSourcePos
impl Display for StartSourcePos
source§impl Hash for StartSourcePos
impl Hash for StartSourcePos
source§impl Into<SourcePos> for StartSourcePos
impl Into<SourcePos> for StartSourcePos
source§impl Ord for StartSourcePos
impl Ord for StartSourcePos
source§fn cmp(&self, other: &StartSourcePos) -> Ordering
fn cmp(&self, other: &StartSourcePos) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<SourcePos> for StartSourcePos
impl PartialEq<SourcePos> for StartSourcePos
source§impl PartialEq<StartSourcePos> for SourcePos
impl PartialEq<StartSourcePos> for SourcePos
source§fn eq(&self, other: &StartSourcePos) -> bool
fn eq(&self, other: &StartSourcePos) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq for StartSourcePos
impl PartialEq for StartSourcePos
source§fn eq(&self, other: &StartSourcePos) -> bool
fn eq(&self, other: &StartSourcePos) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<SourcePos> for StartSourcePos
impl PartialOrd<SourcePos> for StartSourcePos
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl PartialOrd<StartSourcePos> for SourcePos
impl PartialOrd<StartSourcePos> for SourcePos
source§fn partial_cmp(&self, other: &StartSourcePos) -> Option<Ordering>
fn partial_cmp(&self, other: &StartSourcePos) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl PartialOrd for StartSourcePos
impl PartialOrd for StartSourcePos
source§fn partial_cmp(&self, other: &StartSourcePos) -> Option<Ordering>
fn partial_cmp(&self, other: &StartSourcePos) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Sub<StartSourcePos> for SourcePos
impl Sub<StartSourcePos> for SourcePos
impl Copy for StartSourcePos
impl Eq for StartSourcePos
impl StructuralEq for StartSourcePos
impl StructuralPartialEq for StartSourcePos
Auto Trait Implementations§
impl RefUnwindSafe for StartSourcePos
impl Send for StartSourcePos
impl Sync for StartSourcePos
impl Unpin for StartSourcePos
impl UnwindSafe for StartSourcePos
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<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.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.