pub enum Node {
Show 17 variants
Module(OwnedPtr<Module>),
Struct(OwnedPtr<Struct>),
Class(OwnedPtr<Class>),
Exception(OwnedPtr<Exception>),
Field(OwnedPtr<Field>),
Interface(OwnedPtr<Interface>),
Operation(OwnedPtr<Operation>),
Parameter(OwnedPtr<Parameter>),
Enum(OwnedPtr<Enum>),
Enumerator(OwnedPtr<Enumerator>),
CustomType(OwnedPtr<CustomType>),
TypeAlias(OwnedPtr<TypeAlias>),
ResultType(OwnedPtr<ResultType>),
Sequence(OwnedPtr<Sequence>),
Dictionary(OwnedPtr<Dictionary>),
Primitive(OwnedPtr<Primitive>),
Attribute(OwnedPtr<Attribute>),
}Expand description
Represents a node in the Abstract Syntax Tree.
There is one variant for each kind of Slice element that can be stored in the AST, and each variant holds
a single instance of its corresponding element wrapped in an OwnedPtr.
Variants§
Module(OwnedPtr<Module>)
Struct(OwnedPtr<Struct>)
Class(OwnedPtr<Class>)
Exception(OwnedPtr<Exception>)
Field(OwnedPtr<Field>)
Interface(OwnedPtr<Interface>)
Operation(OwnedPtr<Operation>)
Parameter(OwnedPtr<Parameter>)
Enum(OwnedPtr<Enum>)
Enumerator(OwnedPtr<Enumerator>)
CustomType(OwnedPtr<CustomType>)
TypeAlias(OwnedPtr<TypeAlias>)
ResultType(OwnedPtr<ResultType>)
Sequence(OwnedPtr<Sequence>)
Dictionary(OwnedPtr<Dictionary>)
Primitive(OwnedPtr<Primitive>)
Attribute(OwnedPtr<Attribute>)
Trait Implementations§
Source§impl From<OwnedPtr<CustomType>> for Node
impl From<OwnedPtr<CustomType>> for Node
Source§fn from(ptr: OwnedPtr<CustomType>) -> Node
fn from(ptr: OwnedPtr<CustomType>) -> Node
Wraps the OwnedPtr<CustomType> in a Node of the corresponding variant Node::CustomType.
Source§impl From<OwnedPtr<Dictionary>> for Node
impl From<OwnedPtr<Dictionary>> for Node
Source§fn from(ptr: OwnedPtr<Dictionary>) -> Node
fn from(ptr: OwnedPtr<Dictionary>) -> Node
Wraps the OwnedPtr<Dictionary> in a Node of the corresponding variant Node::Dictionary.
Source§impl From<OwnedPtr<Enumerator>> for Node
impl From<OwnedPtr<Enumerator>> for Node
Source§fn from(ptr: OwnedPtr<Enumerator>) -> Node
fn from(ptr: OwnedPtr<Enumerator>) -> Node
Wraps the OwnedPtr<Enumerator> in a Node of the corresponding variant Node::Enumerator.
Source§impl From<OwnedPtr<ResultType>> for Node
impl From<OwnedPtr<ResultType>> for Node
Source§fn from(ptr: OwnedPtr<ResultType>) -> Node
fn from(ptr: OwnedPtr<ResultType>) -> Node
Wraps the OwnedPtr<ResultType> in a Node of the corresponding variant Node::ResultType.
Source§impl<'a> TryFrom<&'a Node> for &'a Attribute
impl<'a> TryFrom<&'a Node> for &'a Attribute
Source§fn try_from(node: &'a Node) -> Result<&'a Attribute, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a Attribute, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a Class
impl<'a> TryFrom<&'a Node> for &'a Class
Source§fn try_from(node: &'a Node) -> Result<&'a Class, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a Class, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a CustomType
impl<'a> TryFrom<&'a Node> for &'a CustomType
Source§fn try_from(node: &'a Node) -> Result<&'a CustomType, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a CustomType, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a Dictionary
impl<'a> TryFrom<&'a Node> for &'a Dictionary
Source§fn try_from(node: &'a Node) -> Result<&'a Dictionary, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a Dictionary, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a Enum
impl<'a> TryFrom<&'a Node> for &'a Enum
Source§fn try_from(node: &'a Node) -> Result<&'a Enum, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a Enum, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a Enumerator
impl<'a> TryFrom<&'a Node> for &'a Enumerator
Source§fn try_from(node: &'a Node) -> Result<&'a Enumerator, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a Enumerator, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a Exception
impl<'a> TryFrom<&'a Node> for &'a Exception
Source§fn try_from(node: &'a Node) -> Result<&'a Exception, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a Exception, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a Field
impl<'a> TryFrom<&'a Node> for &'a Field
Source§fn try_from(node: &'a Node) -> Result<&'a Field, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a Field, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a Interface
impl<'a> TryFrom<&'a Node> for &'a Interface
Source§fn try_from(node: &'a Node) -> Result<&'a Interface, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a Interface, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a Module
impl<'a> TryFrom<&'a Node> for &'a Module
Source§fn try_from(node: &'a Node) -> Result<&'a Module, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a Module, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a Operation
impl<'a> TryFrom<&'a Node> for &'a Operation
Source§fn try_from(node: &'a Node) -> Result<&'a Operation, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a Operation, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Attribute>
impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Attribute>
Source§fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Attribute>, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Attribute>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Class>
impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Class>
Source§fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Class>, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Class>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<CustomType>
impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<CustomType>
Source§fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<CustomType>, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<CustomType>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Dictionary>
impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Dictionary>
Source§fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Dictionary>, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Dictionary>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Enum>
impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Enum>
Source§fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Enum>, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Enum>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Enumerator>
impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Enumerator>
Source§fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Enumerator>, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Enumerator>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Exception>
impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Exception>
Source§fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Exception>, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Exception>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Field>
impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Field>
Source§fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Field>, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Field>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Interface>
impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Interface>
Source§fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Interface>, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Interface>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Module>
impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Module>
Source§fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Module>, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Module>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Operation>
impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Operation>
Source§fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Operation>, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Operation>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Parameter>
impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Parameter>
Source§fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Parameter>, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Parameter>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Primitive>
impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Primitive>
Source§fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Primitive>, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Primitive>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<ResultType>
impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<ResultType>
Source§fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<ResultType>, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<ResultType>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Sequence>
impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Sequence>
Source§fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Sequence>, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Sequence>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Struct>
impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<Struct>
Source§fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Struct>, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<Struct>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<TypeAlias>
impl<'a> TryFrom<&'a Node> for &'a OwnedPtr<TypeAlias>
Source§fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<TypeAlias>, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a OwnedPtr<TypeAlias>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a Parameter
impl<'a> TryFrom<&'a Node> for &'a Parameter
Source§fn try_from(node: &'a Node) -> Result<&'a Parameter, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a Parameter, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a Primitive
impl<'a> TryFrom<&'a Node> for &'a Primitive
Source§fn try_from(node: &'a Node) -> Result<&'a Primitive, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a Primitive, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a ResultType
impl<'a> TryFrom<&'a Node> for &'a ResultType
Source§fn try_from(node: &'a Node) -> Result<&'a ResultType, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a ResultType, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a Sequence
impl<'a> TryFrom<&'a Node> for &'a Sequence
Source§fn try_from(node: &'a Node) -> Result<&'a Sequence, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a Sequence, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a Struct
impl<'a> TryFrom<&'a Node> for &'a Struct
Source§fn try_from(node: &'a Node) -> Result<&'a Struct, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a Struct, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a TypeAlias
impl<'a> TryFrom<&'a Node> for &'a TypeAlias
Source§fn try_from(node: &'a Node) -> Result<&'a TypeAlias, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a TypeAlias, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a dyn Entity
impl<'a> TryFrom<&'a Node> for &'a dyn Entity
Source§impl<'a> TryFrom<&'a Node> for &'a dyn NamedSymbol
impl<'a> TryFrom<&'a Node> for &'a dyn NamedSymbol
Source§fn try_from(node: &'a Node) -> Result<&'a dyn NamedSymbol, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a dyn NamedSymbol, Self::Error>
Attempts to unwrap a node to a dynamically typed reference of a Slice NamedSymbol.
If the Slice element held by the node implements NamedSymbol, this succeeds and returns a typed reference, otherwise this fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for &'a dyn Type
impl<'a> TryFrom<&'a Node> for &'a dyn Type
Source§impl<'a> TryFrom<&'a Node> for WeakPtr<Attribute>
impl<'a> TryFrom<&'a Node> for WeakPtr<Attribute>
Source§fn try_from(node: &'a Node) -> Result<WeakPtr<Attribute>, Self::Error>
fn try_from(node: &'a Node) -> Result<WeakPtr<Attribute>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for WeakPtr<Class>
impl<'a> TryFrom<&'a Node> for WeakPtr<Class>
Source§fn try_from(node: &'a Node) -> Result<WeakPtr<Class>, Self::Error>
fn try_from(node: &'a Node) -> Result<WeakPtr<Class>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for WeakPtr<CustomType>
impl<'a> TryFrom<&'a Node> for WeakPtr<CustomType>
Source§fn try_from(node: &'a Node) -> Result<WeakPtr<CustomType>, Self::Error>
fn try_from(node: &'a Node) -> Result<WeakPtr<CustomType>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for WeakPtr<Dictionary>
impl<'a> TryFrom<&'a Node> for WeakPtr<Dictionary>
Source§fn try_from(node: &'a Node) -> Result<WeakPtr<Dictionary>, Self::Error>
fn try_from(node: &'a Node) -> Result<WeakPtr<Dictionary>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for WeakPtr<Enum>
impl<'a> TryFrom<&'a Node> for WeakPtr<Enum>
Source§fn try_from(node: &'a Node) -> Result<WeakPtr<Enum>, Self::Error>
fn try_from(node: &'a Node) -> Result<WeakPtr<Enum>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for WeakPtr<Enumerator>
impl<'a> TryFrom<&'a Node> for WeakPtr<Enumerator>
Source§fn try_from(node: &'a Node) -> Result<WeakPtr<Enumerator>, Self::Error>
fn try_from(node: &'a Node) -> Result<WeakPtr<Enumerator>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for WeakPtr<Exception>
impl<'a> TryFrom<&'a Node> for WeakPtr<Exception>
Source§fn try_from(node: &'a Node) -> Result<WeakPtr<Exception>, Self::Error>
fn try_from(node: &'a Node) -> Result<WeakPtr<Exception>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for WeakPtr<Field>
impl<'a> TryFrom<&'a Node> for WeakPtr<Field>
Source§fn try_from(node: &'a Node) -> Result<WeakPtr<Field>, Self::Error>
fn try_from(node: &'a Node) -> Result<WeakPtr<Field>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for WeakPtr<Interface>
impl<'a> TryFrom<&'a Node> for WeakPtr<Interface>
Source§fn try_from(node: &'a Node) -> Result<WeakPtr<Interface>, Self::Error>
fn try_from(node: &'a Node) -> Result<WeakPtr<Interface>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for WeakPtr<Module>
impl<'a> TryFrom<&'a Node> for WeakPtr<Module>
Source§fn try_from(node: &'a Node) -> Result<WeakPtr<Module>, Self::Error>
fn try_from(node: &'a Node) -> Result<WeakPtr<Module>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for WeakPtr<Operation>
impl<'a> TryFrom<&'a Node> for WeakPtr<Operation>
Source§fn try_from(node: &'a Node) -> Result<WeakPtr<Operation>, Self::Error>
fn try_from(node: &'a Node) -> Result<WeakPtr<Operation>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for WeakPtr<Parameter>
impl<'a> TryFrom<&'a Node> for WeakPtr<Parameter>
Source§fn try_from(node: &'a Node) -> Result<WeakPtr<Parameter>, Self::Error>
fn try_from(node: &'a Node) -> Result<WeakPtr<Parameter>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for WeakPtr<Primitive>
impl<'a> TryFrom<&'a Node> for WeakPtr<Primitive>
Source§fn try_from(node: &'a Node) -> Result<WeakPtr<Primitive>, Self::Error>
fn try_from(node: &'a Node) -> Result<WeakPtr<Primitive>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for WeakPtr<ResultType>
impl<'a> TryFrom<&'a Node> for WeakPtr<ResultType>
Source§fn try_from(node: &'a Node) -> Result<WeakPtr<ResultType>, Self::Error>
fn try_from(node: &'a Node) -> Result<WeakPtr<ResultType>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for WeakPtr<Sequence>
impl<'a> TryFrom<&'a Node> for WeakPtr<Sequence>
Source§fn try_from(node: &'a Node) -> Result<WeakPtr<Sequence>, Self::Error>
fn try_from(node: &'a Node) -> Result<WeakPtr<Sequence>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for WeakPtr<Struct>
impl<'a> TryFrom<&'a Node> for WeakPtr<Struct>
Source§fn try_from(node: &'a Node) -> Result<WeakPtr<Struct>, Self::Error>
fn try_from(node: &'a Node) -> Result<WeakPtr<Struct>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for WeakPtr<TypeAlias>
impl<'a> TryFrom<&'a Node> for WeakPtr<TypeAlias>
Source§fn try_from(node: &'a Node) -> Result<WeakPtr<TypeAlias>, Self::Error>
fn try_from(node: &'a Node) -> Result<WeakPtr<TypeAlias>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a Node> for WeakPtr<dyn Entity>
impl<'a> TryFrom<&'a Node> for WeakPtr<dyn Entity>
Source§impl<'a> TryFrom<&'a Node> for WeakPtr<dyn Type>
impl<'a> TryFrom<&'a Node> for WeakPtr<dyn Type>
Source§impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Attribute>
impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Attribute>
Source§fn try_from(
node: &'a mut Node,
) -> Result<&'a mut OwnedPtr<Attribute>, Self::Error>
fn try_from( node: &'a mut Node, ) -> Result<&'a mut OwnedPtr<Attribute>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Class>
impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Class>
Source§fn try_from(node: &'a mut Node) -> Result<&'a mut OwnedPtr<Class>, Self::Error>
fn try_from(node: &'a mut Node) -> Result<&'a mut OwnedPtr<Class>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<CustomType>
impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<CustomType>
Source§fn try_from(
node: &'a mut Node,
) -> Result<&'a mut OwnedPtr<CustomType>, Self::Error>
fn try_from( node: &'a mut Node, ) -> Result<&'a mut OwnedPtr<CustomType>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Dictionary>
impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Dictionary>
Source§fn try_from(
node: &'a mut Node,
) -> Result<&'a mut OwnedPtr<Dictionary>, Self::Error>
fn try_from( node: &'a mut Node, ) -> Result<&'a mut OwnedPtr<Dictionary>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Enum>
impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Enum>
Source§fn try_from(node: &'a mut Node) -> Result<&'a mut OwnedPtr<Enum>, Self::Error>
fn try_from(node: &'a mut Node) -> Result<&'a mut OwnedPtr<Enum>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Enumerator>
impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Enumerator>
Source§fn try_from(
node: &'a mut Node,
) -> Result<&'a mut OwnedPtr<Enumerator>, Self::Error>
fn try_from( node: &'a mut Node, ) -> Result<&'a mut OwnedPtr<Enumerator>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Exception>
impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Exception>
Source§fn try_from(
node: &'a mut Node,
) -> Result<&'a mut OwnedPtr<Exception>, Self::Error>
fn try_from( node: &'a mut Node, ) -> Result<&'a mut OwnedPtr<Exception>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Field>
impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Field>
Source§fn try_from(node: &'a mut Node) -> Result<&'a mut OwnedPtr<Field>, Self::Error>
fn try_from(node: &'a mut Node) -> Result<&'a mut OwnedPtr<Field>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Interface>
impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Interface>
Source§fn try_from(
node: &'a mut Node,
) -> Result<&'a mut OwnedPtr<Interface>, Self::Error>
fn try_from( node: &'a mut Node, ) -> Result<&'a mut OwnedPtr<Interface>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Module>
impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Module>
Source§fn try_from(node: &'a mut Node) -> Result<&'a mut OwnedPtr<Module>, Self::Error>
fn try_from(node: &'a mut Node) -> Result<&'a mut OwnedPtr<Module>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Operation>
impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Operation>
Source§fn try_from(
node: &'a mut Node,
) -> Result<&'a mut OwnedPtr<Operation>, Self::Error>
fn try_from( node: &'a mut Node, ) -> Result<&'a mut OwnedPtr<Operation>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Parameter>
impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Parameter>
Source§fn try_from(
node: &'a mut Node,
) -> Result<&'a mut OwnedPtr<Parameter>, Self::Error>
fn try_from( node: &'a mut Node, ) -> Result<&'a mut OwnedPtr<Parameter>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Primitive>
impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Primitive>
Source§fn try_from(
node: &'a mut Node,
) -> Result<&'a mut OwnedPtr<Primitive>, Self::Error>
fn try_from( node: &'a mut Node, ) -> Result<&'a mut OwnedPtr<Primitive>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<ResultType>
impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<ResultType>
Source§fn try_from(
node: &'a mut Node,
) -> Result<&'a mut OwnedPtr<ResultType>, Self::Error>
fn try_from( node: &'a mut Node, ) -> Result<&'a mut OwnedPtr<ResultType>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Sequence>
impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Sequence>
Source§fn try_from(
node: &'a mut Node,
) -> Result<&'a mut OwnedPtr<Sequence>, Self::Error>
fn try_from( node: &'a mut Node, ) -> Result<&'a mut OwnedPtr<Sequence>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Struct>
impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<Struct>
Source§fn try_from(node: &'a mut Node) -> Result<&'a mut OwnedPtr<Struct>, Self::Error>
fn try_from(node: &'a mut Node) -> Result<&'a mut OwnedPtr<Struct>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
Source§impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<TypeAlias>
impl<'a> TryFrom<&'a mut Node> for &'a mut OwnedPtr<TypeAlias>
Source§fn try_from(
node: &'a mut Node,
) -> Result<&'a mut OwnedPtr<TypeAlias>, Self::Error>
fn try_from( node: &'a mut Node, ) -> Result<&'a mut OwnedPtr<TypeAlias>, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.