pub struct LinearSpan { /* private fields */ }Expand description
A linear span in the ECMAScript source code.
Stores a linear start position and a linear end position.
Note that linear spans are of the form [start, end) i.e. that the start position is inclusive and the end position is exclusive.
Implementations§
Source§impl LinearSpan
impl LinearSpan
Sourcepub const fn new(start: LinearPosition, end: LinearPosition) -> Self
pub const fn new(start: LinearPosition, end: LinearPosition) -> Self
Sourcepub const fn start(self) -> LinearPosition
pub const fn start(self) -> LinearPosition
Gets the starting position of the span.
Sourcepub const fn end(self) -> LinearPosition
pub const fn end(self) -> LinearPosition
Gets the final position of the span.
Trait Implementations§
Source§impl<'a> Arbitrary<'a> for LinearSpan
Available on crate feature arbitrary only.
impl<'a> Arbitrary<'a> for LinearSpan
Available on crate feature
arbitrary only.Source§fn arbitrary(_: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(_: &mut Unstructured<'a>) -> Result<Self>
Generate an arbitrary value of
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Generate an arbitrary value of
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read moreSource§impl Clone for LinearSpan
impl Clone for LinearSpan
Source§fn clone(&self) -> LinearSpan
fn clone(&self) -> LinearSpan
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 moreimpl Copy for LinearSpan
Source§impl Debug for LinearSpan
impl Debug for LinearSpan
Source§impl Default for LinearSpan
impl Default for LinearSpan
Source§fn default() -> LinearSpan
fn default() -> LinearSpan
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LinearSpan
impl<'de> Deserialize<'de> for LinearSpan
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 LinearSpan
Source§impl From<LinearPosition> for LinearSpan
impl From<LinearPosition> for LinearSpan
Source§fn from(pos: LinearPosition) -> Self
fn from(pos: LinearPosition) -> Self
Converts to this type from the input type.
Source§impl From<LinearSpan> for LinearSpanIgnoreEq
impl From<LinearSpan> for LinearSpanIgnoreEq
Source§fn from(value: LinearSpan) -> Self
fn from(value: LinearSpan) -> Self
Converts to this type from the input type.
Source§impl Hash for LinearSpan
impl Hash for LinearSpan
Source§impl PartialEq for LinearSpan
impl PartialEq for LinearSpan
Source§impl PartialOrd for LinearSpan
impl PartialOrd for LinearSpan
Source§impl Serialize for LinearSpan
impl Serialize for LinearSpan
impl StructuralPartialEq for LinearSpan
Auto Trait Implementations§
impl Freeze for LinearSpan
impl RefUnwindSafe for LinearSpan
impl Send for LinearSpan
impl Sync for LinearSpan
impl Unpin for LinearSpan
impl UnsafeUnpin for LinearSpan
impl UnwindSafe for LinearSpan
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.