pub enum Node {
Null(Null),
Bool(Bool),
Number(Number),
String(String),
Array(Array),
Object(Object),
}Variants§
Implementations§
Source§impl Node
impl Node
pub fn path(&self, keys: &Keys) -> Option<Node>
pub fn get(&self, key: &KeyOrIndex) -> Option<Node>
pub fn validate(&self) -> Result<(), impl Iterator<Item = DomError> + Debug>
pub fn is_valid(&self) -> bool
pub fn is_scalar(&self) -> bool
pub fn is_integer(&self) -> bool
pub fn text_range(&self) -> Option<TextRange>
pub fn node_text_range(&self) -> Option<TextRange>
pub fn matches_all( &self, keys: QueryKeys, match_children: bool, ) -> Result<impl Iterator<Item = (Keys, Node)> + ExactSizeIterator, DomError>
pub fn scalar_text(&self) -> Option<StdString>
pub fn mapper_range(&self, mapper: &Mapper) -> Option<Range>
Source§impl Node
impl Node
pub fn is_null(&self) -> bool
pub fn as_null(&self) -> Option<&Null>
pub fn get_as_null(&self, key: impl Into<Key>) -> Option<(Key, Option<Null>)>
pub fn is_bool(&self) -> bool
pub fn as_bool(&self) -> Option<&Bool>
pub fn get_as_bool(&self, key: impl Into<Key>) -> Option<(Key, Option<Bool>)>
pub fn is_number(&self) -> bool
pub fn as_number(&self) -> Option<&Number>
pub fn get_as_number( &self, key: impl Into<Key>, ) -> Option<(Key, Option<Number>)>
pub fn is_string(&self) -> bool
pub fn as_string(&self) -> Option<&String>
pub fn get_as_string( &self, key: impl Into<Key>, ) -> Option<(Key, Option<String>)>
pub fn is_object(&self) -> bool
pub fn as_object(&self) -> Option<&Object>
pub fn get_as_object( &self, key: impl Into<Key>, ) -> Option<(Key, Option<Object>)>
pub fn is_array(&self) -> bool
pub fn as_array(&self) -> Option<&Array>
pub fn get_as_array(&self, key: impl Into<Key>) -> Option<(Key, Option<Array>)>
Source§impl Node
impl Node
pub fn to_plain_json(&self) -> Value
pub fn from_plain_json(value: Value) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Node
impl<'de> Deserialize<'de> for Node
Source§fn deserialize<D>(de: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(de: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl DomNode for Node
impl DomNode for Node
fn node_syntax(&self) -> Option<&SyntaxElement>
fn syntax(&self) -> Option<&SyntaxElement>
fn errors(&self) -> &Shared<Vec<DomError>>
fn annotations(&self) -> Option<&Annotations>
Auto Trait Implementations§
impl Freeze for Node
impl !RefUnwindSafe for Node
impl !Send for Node
impl !Sync for Node
impl Unpin for Node
impl !UnwindSafe for Node
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