[−][src]Struct kg_tree::NodeRef
Methods
impl NodeRef
[src]
pub fn null() -> NodeRef
[src]
pub fn boolean(b: bool) -> NodeRef
[src]
pub fn integer(n: i64) -> NodeRef
[src]
pub fn float(n: f64) -> NodeRef
[src]
pub fn string<S: Into<String>>(s: S) -> NodeRef
[src]
pub fn binary<B: Into<Vec<u8>>>(b: B) -> NodeRef
[src]
pub fn array(elems: Elements) -> NodeRef
[src]
pub fn object(props: Properties) -> NodeRef
[src]
pub fn is_consumable(&self) -> bool
[src]
pub fn into_consumable(self) -> NodeRef
[src]
pub fn from_type<T>(value: T) -> Result<NodeRef, Error> where
T: Serialize,
[src]
T: Serialize,
pub fn from_json(s: &str) -> Result<NodeRef, ParseDiag>
[src]
pub fn from_yaml(s: &str) -> Result<NodeRef, ParseDiag>
[src]
pub fn from_toml(s: &str) -> Result<NodeRef, ParseDiag>
[src]
pub fn from_str(s: Cow<str>, format: FileFormat) -> Result<NodeRef, BasicDiag>
[src]
pub fn from_bytes(s: &[u8], format: FileFormat) -> Result<NodeRef, BasicDiag>
[src]
pub fn from_file(
file_path: &Path,
format: Option<FileFormat>
) -> Result<NodeRef, BasicDiag>
[src]
file_path: &Path,
format: Option<FileFormat>
) -> Result<NodeRef, BasicDiag>
pub fn to_type<'de, T>(&self) -> Result<T, Error> where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
pub fn to_json(&self) -> String
[src]
pub fn to_json_pretty(&self) -> String
[src]
pub fn to_yaml(&self) -> String
[src]
pub fn to_toml(&self) -> String
[src]
pub fn to_format(&self, format: FileFormat, pretty: bool) -> String
[src]
pub fn data(&self) -> Ref<Node>
[src]
pub fn data_mut(&self) -> RefMut<Node>
[src]
pub fn data_ptr(&self) -> *const Node
[src]
pub fn path(&self) -> Opath
[src]
pub fn into_string(self) -> String
[src]
pub fn as_string(&self) -> String
[src]
pub fn as_integer(&self) -> Option<i64>
[src]
pub fn as_float(&self) -> f64
[src]
pub fn as_binary(&self) -> Option<Vec<u8>>
[src]
pub fn as_boolean(&self) -> bool
[src]
pub fn is_integer(&self) -> bool
[src]
pub fn is_float(&self) -> bool
[src]
pub fn is_number(&self) -> bool
[src]
pub fn is_object(&self) -> bool
[src]
pub fn is_string(&self) -> bool
[src]
pub fn is_array(&self) -> bool
[src]
pub fn is_binary(&self) -> bool
[src]
pub fn is_boolean(&self) -> bool
[src]
pub fn is_null(&self) -> bool
[src]
pub fn is_parent(&self) -> bool
[src]
pub fn get_child_index(&self, index: usize) -> Option<NodeRef>
[src]
pub fn get_child_key(&self, key: &str) -> Option<NodeRef>
[src]
pub fn add_child(
&self,
index: Option<usize>,
key: Option<Symbol>,
value: NodeRef
) -> Result<Option<NodeRef>, BasicDiag>
[src]
&self,
index: Option<usize>,
key: Option<Symbol>,
value: NodeRef
) -> Result<Option<NodeRef>, BasicDiag>
pub fn set_child(
&self,
index: Option<usize>,
key: Option<Symbol>,
value: NodeRef
) -> Result<Option<NodeRef>, BasicDiag>
[src]
&self,
index: Option<usize>,
key: Option<Symbol>,
value: NodeRef
) -> Result<Option<NodeRef>, BasicDiag>
pub fn add_children<'a, I>(
&self,
drop: bool,
items: I
) -> Result<Vec<NodeRef>, BasicDiag> where
I: Iterator<Item = (Option<usize>, Option<Symbol>, NodeRef)>,
[src]
&self,
drop: bool,
items: I
) -> Result<Vec<NodeRef>, BasicDiag> where
I: Iterator<Item = (Option<usize>, Option<Symbol>, NodeRef)>,
pub fn remove_child(
&self,
index: Option<usize>,
key: Option<Cow<str>>
) -> Result<Option<NodeRef>, BasicDiag>
[src]
&self,
index: Option<usize>,
key: Option<Cow<str>>
) -> Result<Option<NodeRef>, BasicDiag>
pub fn remove_children<'a, I>(
&self,
drop: bool,
items: I
) -> Result<Vec<NodeRef>, TreeErrorDetail> where
I: Iterator<Item = (Option<usize>, Option<Cow<'a, str>>)>,
[src]
&self,
drop: bool,
items: I
) -> Result<Vec<NodeRef>, TreeErrorDetail> where
I: Iterator<Item = (Option<usize>, Option<Cow<'a, str>>)>,
pub fn extend(&self, o: NodeRef, index: Option<usize>) -> Result<(), BasicDiag>
[src]
pub fn extend_multiple<I>(&self, extends: I) -> Result<(), BasicDiag> where
I: Iterator<Item = (NodeRef, Option<usize>)>,
[src]
I: Iterator<Item = (NodeRef, Option<usize>)>,
pub fn is_ref_eq(&self, other: &NodeRef) -> bool
[src]
pub fn deep_copy(&self) -> NodeRef
[src]
pub fn visit_recursive<F>(&self, visitor: F) where
F: FnMut(&NodeRef, &NodeRef, &NodeRef) -> bool,
[src]
F: FnMut(&NodeRef, &NodeRef, &NodeRef) -> bool,
pub fn visit_children<F>(&self, visitor: F) -> bool where
F: FnMut(&NodeRef, &NodeRef) -> bool,
[src]
F: FnMut(&NodeRef, &NodeRef) -> bool,
pub fn heap_size(&self) -> usize
[src]
pub fn is_equal(&self, other: &NodeRef) -> bool
[src]
pub fn is_identical(&self, other: &NodeRef) -> bool
[src]
pub fn is_identical_deep(&self, other: &NodeRef) -> bool
[src]
pub fn with_span(self, span: Span) -> NodeRef
[src]
Trait Implementations
impl<'a> Clone for NodeRef
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl From<NodeRef> for NodeSet
[src]
impl<'a> PartialOrd<NodeRef> for NodeRef
[src]
fn partial_cmp(&self, other: &NodeRef) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<'a> PartialEq<NodeRef> for NodeRef
[src]
fn eq(&self, other: &NodeRef) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<'a> Display for NodeRef
[src]
impl Debug for NodeRef
[src]
impl<'a> HeapSizeOf for NodeRef
[src]
fn heap_size_of_children(&self) -> usize
[src]
impl<'a> Serialize for NodeRef
[src]
impl<'de> Deserialize<'de> for NodeRef
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
Auto Trait Implementations
impl !Sync for NodeRef
impl !Send for NodeRef
impl Unpin for NodeRef
impl !RefUnwindSafe for NodeRef
impl !UnwindSafe for NodeRef
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,