pub struct PFacetAttr {
pub ns: Option<Ident>,
pub key: Ident,
pub args: TokenStream,
}Expand description
A parsed facet attribute.
All attributes are now stored uniformly - either with a namespace (kdl::child)
or without (sensitive). The grammar system handles validation and semantics.
Fields§
§ns: Option<Ident>The namespace (e.g., “kdl”, “args”). None for builtin attributes.
key: IdentThe key (e.g., “child”, “sensitive”, “rename”)
args: TokenStreamThe arguments as a TokenStream
Implementations§
Source§impl PFacetAttr
impl PFacetAttr
Sourcepub fn parse(facet_attr: &FacetAttr, dest: &mut Vec<PFacetAttr>)
pub fn parse(facet_attr: &FacetAttr, dest: &mut Vec<PFacetAttr>)
Parse a FacetAttr attribute into PFacetAttr entries.
All attributes are captured uniformly as ns/key/args. The grammar system handles validation - we just capture the tokens.
Sourcepub fn is_builtin(&self) -> bool
pub fn is_builtin(&self) -> bool
Returns true if this is a builtin attribute (no namespace)
Trait Implementations§
Source§impl Clone for PFacetAttr
impl Clone for PFacetAttr
Source§fn clone(&self) -> PFacetAttr
fn clone(&self) -> PFacetAttr
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PFacetAttr
impl RefUnwindSafe for PFacetAttr
impl !Send for PFacetAttr
impl !Sync for PFacetAttr
impl Unpin for PFacetAttr
impl UnwindSafe for PFacetAttr
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