pub struct RawRdNode { /* private fields */ }Expand description
A losslessly-preserved Rd node that doesn’t fit
RdNode::Tagged or
RdNode::Group: it carries attributes beyond
those the producer recognizes (for the RDS lowering, beyond
Rd_tag/Rd_option plus the deliberately-discarded srcref – see that
module’s validated attribute policy), or has another genuinely
non-canonical shape (an untagged non-list value, or an untagged node
carrying an Rd_option).
Implementations§
Source§impl RawRdNode
impl RawRdNode
pub fn tag(&self) -> Option<&str>
pub fn option(&self) -> Option<&[RdNode]>
pub fn children(&self) -> &[RdNode]
pub fn payload(&self) -> Option<&RawRdValue>
pub fn attributes(&self) -> &[RdAttribute]
Sourcepub fn into_parts(
self,
) -> (Option<String>, Option<Vec<RdNode>>, Vec<RdNode>, Option<RawRdValue>, Vec<RdAttribute>)
pub fn into_parts( self, ) -> (Option<String>, Option<Vec<RdNode>>, Vec<RdNode>, Option<RawRdValue>, Vec<RdAttribute>)
Consumes the node into (tag, option, children, payload, attributes).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RawRdNode
impl<'de> Deserialize<'de> for RawRdNode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for RawRdNode
Auto Trait Implementations§
impl Freeze for RawRdNode
impl RefUnwindSafe for RawRdNode
impl Send for RawRdNode
impl Sync for RawRdNode
impl Unpin for RawRdNode
impl UnsafeUnpin for RawRdNode
impl UnwindSafe for RawRdNode
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