pub struct ChildNode {
pub value_type: Option<String>,
pub value: Value,
}Expand description
ChildNode — wrapper for the union type.
FlatBuffers JSON format: { "value_type": "TypeName", "value": { ... } }
Fields§
§value_type: Option<String>§value: ValueImplementations§
Source§impl ChildNode
impl ChildNode
Sourcepub fn node_id(&self) -> Option<String>
pub fn node_id(&self) -> Option<String>
Try to extract the node_id from the inner value, regardless of type.
Sourcepub fn semantic_node_id(&self) -> Option<String>
pub fn semantic_node_id(&self) -> Option<String>
Get the semantic_node_id if present.
Sourcepub fn as_type<T: DeserializeOwned>(&self) -> Option<T>
pub fn as_type<T: DeserializeOwned>(&self) -> Option<T>
Deserialize the inner value as a specific type.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ChildNode
impl<'de> Deserialize<'de> for ChildNode
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
Auto Trait Implementations§
impl Forget for ChildNode
impl Freeze for ChildNode
impl Move for ChildNode
impl RefUnwindSafe for ChildNode
impl Send for ChildNode
impl Sync for ChildNode
impl Unpin for ChildNode
impl UnsafeUnpin for ChildNode
impl UnwindSafe for ChildNode
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