pub struct SchemaWith(/* private fields */);Expand description
with { ... } body of a #schema / #extend directive.
Children: pragma directives + zero or more SchemaMethod.
Implementations§
Source§impl SchemaWith
impl SchemaWith
Sourcepub fn cast(node: SyntaxNode) -> Option<Self>
pub fn cast(node: SyntaxNode) -> Option<Self>
Wrap node if its SyntaxKind matches; otherwise
return None. O(1) — just a kind check.
Sourcepub fn syntax(&self) -> &SyntaxNode
pub fn syntax(&self) -> &SyntaxNode
Borrow the underlying SyntaxNode. Useful for
downstream traversals that want CST-level access.
Trait Implementations§
Source§impl Clone for SchemaWith
impl Clone for SchemaWith
Source§fn clone(&self) -> SchemaWith
fn clone(&self) -> SchemaWith
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SchemaWith
impl Debug for SchemaWith
impl Eq for SchemaWith
Source§impl Hash for SchemaWith
impl Hash for SchemaWith
Source§impl PartialEq for SchemaWith
impl PartialEq for SchemaWith
Source§fn eq(&self, other: &SchemaWith) -> bool
fn eq(&self, other: &SchemaWith) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SchemaWith
Auto Trait Implementations§
impl !RefUnwindSafe for SchemaWith
impl !Send for SchemaWith
impl !Sync for SchemaWith
impl !UnwindSafe for SchemaWith
impl Freeze for SchemaWith
impl Unpin for SchemaWith
impl UnsafeUnpin for SchemaWith
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