pub struct YamlNodeWrapper(/* private fields */);Implementations§
Source§impl YamlNodeWrapper
impl YamlNodeWrapper
Sourcepub fn new(value: Yaml) -> Self
pub fn new(value: Yaml) -> Self
Examples found in repository?
examples/deserialize_into_dynamic_value.rs (lines 17-21)
12fn main() {
13 let result: TestStruct = from_str("kind: Foo\ndata: [1,2,3]\n").unwrap();
14
15 assert_eq!(TestStruct {
16 kind: "Foo".to_owned(),
17 data: YamlNodeWrapper::new(
18 Yaml::Array(
19 vec![Yaml::Integer(1), Yaml::Integer(2), Yaml::Integer(3)]
20 ),
21 ),
22 }, result);
23}pub fn get(self) -> Yaml
Trait Implementations§
Source§impl Debug for YamlNodeWrapper
impl Debug for YamlNodeWrapper
Source§impl<'de> Deserialize<'de> for YamlNodeWrapper
impl<'de> Deserialize<'de> for YamlNodeWrapper
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
Source§impl Hash for YamlNodeWrapper
impl Hash for YamlNodeWrapper
Source§impl PartialEq for YamlNodeWrapper
impl PartialEq for YamlNodeWrapper
Source§impl Serialize for YamlNodeWrapper
impl Serialize for YamlNodeWrapper
impl Eq for YamlNodeWrapper
impl StructuralPartialEq for YamlNodeWrapper
Auto Trait Implementations§
impl Freeze for YamlNodeWrapper
impl RefUnwindSafe for YamlNodeWrapper
impl Send for YamlNodeWrapper
impl Sync for YamlNodeWrapper
impl Unpin for YamlNodeWrapper
impl UnwindSafe for YamlNodeWrapper
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