pub struct DataDiff<'a> { /* private fields */ }
Expand description
YANG data tree diff.
Implementations§
Source§impl<'a> DataDiff<'a>
impl<'a> DataDiff<'a>
Sourcepub fn parse_string(
context: &'a Context,
data: impl AsRef<[u8]>,
format: DataFormat,
parser_options: DataParserFlags,
validation_options: DataValidationFlags,
) -> Result<DataDiff<'a>, Error>
pub fn parse_string( context: &'a Context, data: impl AsRef<[u8]>, format: DataFormat, parser_options: DataParserFlags, validation_options: DataValidationFlags, ) -> Result<DataDiff<'a>, Error>
Parse (and validate) input data as a YANG data diff.
Sourcepub fn iter(&self) -> impl Iterator<Item = (DataDiffOp, DataNodeRef<'_, '_>)>
pub fn iter(&self) -> impl Iterator<Item = (DataDiffOp, DataNodeRef<'_, '_>)>
Returns an iterator over the data changes.
Trait Implementations§
Source§impl<'a> Data<'a> for DataDiff<'a>
impl<'a> Data<'a> for DataDiff<'a>
Source§fn find_xpath(&self, xpath: &str) -> Result<Set<'_, DataNodeRef<'_, 'a>>, Error>
fn find_xpath(&self, xpath: &str) -> Result<Set<'_, DataNodeRef<'_, 'a>>, Error>
Search in the given data for instances of nodes matching the provided
XPath. Read more
Source§fn find_path(&self, path: &str) -> Result<DataNodeRef<'_, 'a>, Error>
fn find_path(&self, path: &str) -> Result<DataNodeRef<'_, 'a>, Error>
Search in the given data for a single node matching the provided XPath. Read more
Source§fn print_file<F: AsRawFd>(
&self,
fd: F,
format: DataFormat,
options: DataPrinterFlags,
) -> Result<(), Error>
fn print_file<F: AsRawFd>( &self, fd: F, format: DataFormat, options: DataPrinterFlags, ) -> Result<(), Error>
Print data tree in the specified format.
Source§fn print_string(
&self,
format: DataFormat,
options: DataPrinterFlags,
) -> Result<Option<String>, Error>
fn print_string( &self, format: DataFormat, options: DataPrinterFlags, ) -> Result<Option<String>, Error>
Print data tree in the specified format to a
String
. Read moreSource§fn print_bytes(
&self,
format: DataFormat,
options: DataPrinterFlags,
) -> Result<Option<Vec<u8>>, Error>
fn print_bytes( &self, format: DataFormat, options: DataPrinterFlags, ) -> Result<Option<Vec<u8>>, Error>
Print data tree in the specified format to a bytes vector.
Auto Trait Implementations§
impl<'a> Freeze for DataDiff<'a>
impl<'a> RefUnwindSafe for DataDiff<'a>
impl<'a> Send for DataDiff<'a>
impl<'a> Sync for DataDiff<'a>
impl<'a> Unpin for DataDiff<'a>
impl<'a> UnwindSafe for DataDiff<'a>
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