pub struct TokenAddress {
pub statement: StatementAddress,
pub token_index: TokenIndex,
}
Expand description
A token is located within a $c or $v by giving the address of the declaring statement and the zero-based index within the math string.
In most cases you will use Atom
instead, so the size of this struct, while
a bit silly, doesn’t matter so much.
Fields§
§statement: StatementAddress
Address of the statement in which the token is defined.
token_index: TokenIndex
Index of the token within the defining statement’s math string.
Implementations§
Source§impl TokenAddress
impl TokenAddress
Sourcepub const fn new3(
segment_id: SegmentId,
index: StatementIndex,
token: TokenIndex,
) -> Self
pub const fn new3( segment_id: SegmentId, index: StatementIndex, token: TokenIndex, ) -> Self
Constructs a token address from parts.
Trait Implementations§
Source§impl Clone for TokenAddress
impl Clone for TokenAddress
Source§fn clone(&self) -> TokenAddress
fn clone(&self) -> TokenAddress
Returns a duplicate 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 Comparer<TokenAddress> for Database
impl Comparer<TokenAddress> for Database
Source§fn cmp(&self, left: &TokenAddress, right: &TokenAddress) -> Ordering
fn cmp(&self, left: &TokenAddress, right: &TokenAddress) -> Ordering
Compares two objects, like
Ord::cmp
, but with additional state data
from the comparer that can be used for the ordering.Source§impl Debug for TokenAddress
impl Debug for TokenAddress
Source§impl Default for TokenAddress
impl Default for TokenAddress
Source§fn default() -> TokenAddress
fn default() -> TokenAddress
Returns the “default value” for a type. Read more
Source§impl PartialEq for TokenAddress
impl PartialEq for TokenAddress
impl Copy for TokenAddress
impl Eq for TokenAddress
impl StructuralPartialEq for TokenAddress
Auto Trait Implementations§
impl Freeze for TokenAddress
impl RefUnwindSafe for TokenAddress
impl Send for TokenAddress
impl Sync for TokenAddress
impl Unpin for TokenAddress
impl UnwindSafe for TokenAddress
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more