Struct anchor_syn::parser::context::CrateContext
source · pub struct CrateContext { /* private fields */ }
Expand description
Crate parse context
Keeps track of modules defined within a crate.
Implementations§
source§impl CrateContext
impl CrateContext
pub fn parse(root: impl AsRef<Path>) -> Result<Self>
pub fn consts(&self) -> impl Iterator<Item = &ItemConst>
pub fn impl_consts(&self) -> impl Iterator<Item = (&Ident, &ImplItemConst)>
pub fn structs(&self) -> impl Iterator<Item = &ItemStruct>
pub fn enums(&self) -> impl Iterator<Item = &ItemEnum>
pub fn type_aliases(&self) -> impl Iterator<Item = &ItemType>
pub fn modules(&self) -> impl Iterator<Item = ModuleContext<'_>>
pub fn root_module(&self) -> ModuleContext<'_>
pub fn safety_checks(&self) -> Result<()>
Auto Trait Implementations§
impl Freeze for CrateContext
impl RefUnwindSafe for CrateContext
impl !Send for CrateContext
impl !Sync for CrateContext
impl Unpin for CrateContext
impl UnwindSafe for CrateContext
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