pub struct TextToken {
pub token: Token2,
/* private fields */
}
Fields§
§token: Token2
Implementations§
Source§impl TextToken
impl TextToken
pub fn local(&self) -> Local<()>
pub fn original(&self) -> Option<Local<()>>
pub fn into_position(self) -> TextToken
pub fn try_as_token(&self) -> Result<Token, Bound>
pub fn as_original_token(&self) -> Option<Local<&Token2>>
pub fn into_original_token(self) -> Option<Local<Token2>>
pub fn original_str<'s>( &self, original: &'s str, ) -> Result<&'s str, OriginalError>
pub fn merge_tokens( &self, other: &TextToken, new_token: Option<Token2>, ) -> Result<TextToken, TextToken>
Trait Implementations§
Source§impl Ord for TextToken
impl Ord for TextToken
Source§impl PartialOrd for TextToken
impl PartialOrd for TextToken
impl Copy for TextToken
impl Eq for TextToken
impl StructuralPartialEq for TextToken
Auto Trait Implementations§
impl Freeze for TextToken
impl RefUnwindSafe for TextToken
impl Send for TextToken
impl Sync for TextToken
impl Unpin for TextToken
impl UnwindSafe for TextToken
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