pub struct SynPos {
pub syn: Syntax,
pub info: Rc<SynPosInfo>,
}Expand description
Structure for holding information about origin of an AST node.
Fields§
§syn: Syntax§info: Rc<SynPosInfo>Implementations§
Source§impl SynPos
impl SynPos
pub fn empty() -> Self
pub fn new(syn: Syntax, line: u32, col: u32, file: FileRef) -> Self
pub fn has_info(&self) -> bool
pub fn line(&self) -> u32
pub fn col(&self) -> u32
pub fn filename(&self) -> &str
pub fn syn(&self) -> Syntax
pub fn set_syn(&mut self, syn: Syntax)
pub fn set_name(&mut self, name: &str)
pub fn s_short(&self) -> String
pub fn s_only_pos(&self) -> String
Trait Implementations§
impl StructuralPartialEq for SynPos
Auto Trait Implementations§
impl Freeze for SynPos
impl RefUnwindSafe for SynPos
impl !Send for SynPos
impl !Sync for SynPos
impl Unpin for SynPos
impl UnwindSafe for SynPos
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