pub struct UnknownStatement { /* private fields */ }Implementations§
Source§impl UnknownStatement
impl UnknownStatement
pub fn from_raw(raw: Value) -> Result<Self, String>
Sourcepub fn node_type(&self) -> &str
pub fn node_type(&self) -> &str
The node’s type discriminant, read from the captured BaseNode.
Falls back to "Unknown" rather than panicking if the raw node was
mutated out from under it.
pub fn raw(&self) -> &Value
Sourcepub fn with_raw_mut<R>(
&mut self,
f: impl FnOnce(&mut Value) -> R,
) -> Result<R, String>
pub fn with_raw_mut<R>( &mut self, f: impl FnOnce(&mut Value) -> R, ) -> Result<R, String>
Mutate the raw node, then refresh the cached BaseNode so base()
and node_type() cannot drift from raw. Mutations that remove the
string type field are rejected and rolled back.
pub fn base(&self) -> &BaseNode
Trait Implementations§
Source§impl Clone for UnknownStatement
impl Clone for UnknownStatement
Source§fn clone(&self) -> UnknownStatement
fn clone(&self) -> UnknownStatement
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UnknownStatement
impl Debug for UnknownStatement
Source§impl<'de> Deserialize<'de> for UnknownStatement
impl<'de> Deserialize<'de> for UnknownStatement
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 Freeze for UnknownStatement
impl RefUnwindSafe for UnknownStatement
impl Send for UnknownStatement
impl Sync for UnknownStatement
impl Unpin for UnknownStatement
impl UnsafeUnpin for UnknownStatement
impl UnwindSafe for UnknownStatement
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