pub struct ValueInspector<'a>(pub &'a YamlNode);Expand description
Value inspector for deep type analysis.
Provides detailed information about a YAML value including:
- Parsed type
- Raw text representation
- Coercion possibilities
§Example
use yaml_edit::{YamlFile, debug::ValueInspector};
use std::str::FromStr;
let yaml = YamlFile::from_str("port: 8080").unwrap();
let doc = yaml.document().unwrap();
let mapping = doc.as_mapping().unwrap();
let value = mapping.get("port").unwrap();
println!("{}", ValueInspector(&value));Tuple Fields§
§0: &'a YamlNodeTrait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ValueInspector<'a>
impl<'a> !RefUnwindSafe for ValueInspector<'a>
impl<'a> !Send for ValueInspector<'a>
impl<'a> !Sync for ValueInspector<'a>
impl<'a> Unpin for ValueInspector<'a>
impl<'a> UnsafeUnpin for ValueInspector<'a>
impl<'a> !UnwindSafe for ValueInspector<'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