#[non_exhaustive]pub struct OwnedScope {
pub namespace: Option<String>,
pub class_name: Option<String>,
pub function_name: Option<String>,
}Expand description
Lexical scope context for owned AST traversal.
Like crate::visitor::Scope but uses Option<String> instead of
Option<&str> so the owned visitor has no lifetime parameters.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.namespace: Option<String>Current namespace, or None for the global namespace.
class_name: Option<String>Name of the immediately enclosing class-like declaration, or None.
function_name: Option<String>Name of the immediately enclosing named function or method, or None.
Trait Implementations§
Source§impl Clone for OwnedScope
impl Clone for OwnedScope
Source§impl Debug for OwnedScope
impl Debug for OwnedScope
Auto Trait Implementations§
impl Freeze for OwnedScope
impl RefUnwindSafe for OwnedScope
impl Send for OwnedScope
impl Sync for OwnedScope
impl Unpin for OwnedScope
impl UnsafeUnpin for OwnedScope
impl UnwindSafe for OwnedScope
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