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
sourceimpl CrateContext
impl CrateContext
pub fn consts(&self) -> impl Iterator<Item = &ItemConst>
pub fn structs(&self) -> impl Iterator<Item = &ItemStruct>
pub fn enums(&self) -> impl Iterator<Item = &ItemEnum>
pub fn modules(&self) -> impl Iterator<Item = ModuleContext<'_>>
pub fn root_module(&self) -> ModuleContext<'_>
pub fn parse(root: impl AsRef<Path>) -> Result<Self, Error>
pub fn safety_checks(&self) -> Result<(), Error>
Auto Trait Implementations
impl RefUnwindSafe for CrateContext
impl !Send for CrateContext
impl !Sync for CrateContext
impl Unpin for CrateContext
impl UnwindSafe for CrateContext
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more