Struct Ast

Source
pub struct Ast {
Show 14 fields pub branches: IndexVec<BranchId, AttributeNode<BranchDeclaration>>, pub nets: IndexVec<NetId, AttributeNode<Net>>, pub ports: IndexVec<PortId, AttributeNode<Port>>, pub variables: IndexVec<VariableId, AttributeNode<Variable>>, pub parameters: IndexVec<ParameterId, AttributeNode<Parameter>>, pub modules: IndexVec<ModuleId, AttributeNode<Module>>, pub functions: IndexVec<FunctionId, AttributeNode<Function>>, pub disciplines: IndexVec<DisciplineId, AttributeNode<Discipline>>, pub natures: IndexVec<NatureId, AttributeNode<Nature>>, pub expressions: IndexVec<ExpressionId, Node<Expression>>, pub blocks: IndexVec<BlockId, AttributeNode<SeqBlock>>, pub attributes: IndexVec<AttributeId, Attribute>, pub statements: IndexVec<StatementId, Statement>, pub top_symbols: SymbolTable,
}
Expand description

An Ast representing a parsed Verilog-AMS project (root file); It provides stable indicies for every Node because the entire Tree is immutable once created; It uses preallocated constant size arrays for performance

Fields§

§branches: IndexVec<BranchId, AttributeNode<BranchDeclaration>>§nets: IndexVec<NetId, AttributeNode<Net>>§ports: IndexVec<PortId, AttributeNode<Port>>§variables: IndexVec<VariableId, AttributeNode<Variable>>§parameters: IndexVec<ParameterId, AttributeNode<Parameter>>§modules: IndexVec<ModuleId, AttributeNode<Module>>§functions: IndexVec<FunctionId, AttributeNode<Function>>§disciplines: IndexVec<DisciplineId, AttributeNode<Discipline>>§natures: IndexVec<NatureId, AttributeNode<Nature>>§expressions: IndexVec<ExpressionId, Node<Expression>>§blocks: IndexVec<BlockId, AttributeNode<SeqBlock>>§attributes: IndexVec<AttributeId, Attribute>§statements: IndexVec<StatementId, Statement>§top_symbols: SymbolTable

Implementations§

Source§

impl Ast

Source

pub fn new() -> Self

Source§

impl Ast

Source

pub fn lower(self) -> Result<Hir, (Vec<Error>, Self)>

Lowers an AST to an HIR by resolving references, ambiguities and enforcing nature/discipline comparability

Source

pub fn lower_with_decl_handler( self, declaration_handler: &mut impl DeclarationHandler, ) -> Result<Hir, (Vec<Error>, Self)>

Lowers an AST to an HIR by resolving references, ambiguities and enforcing nature/discipline comparability

Source

pub fn lower_and_print_errors( self, source_map: &SourceMap<'_>, translate_lines: bool, ) -> Option<Hir>

Lowers an AST to an HIR by resolving references, ambiguities and enforcing nature/discipline comparability and printing any errors or warnings that might occur

Source

pub fn lower_and_print_errors_with_var_decl_handle( self, source_map: &SourceMap<'_>, translate_lines: bool, declaration_handler: &mut impl DeclarationHandler, ) -> Option<Hir>

Lowers an AST to an HIR by resolving references, ambiguities and enforcing nature/discipline comparability and printing any errors or warnings that might occur

Source§

impl Ast

Source

pub fn parse_from<'source_map, 'lt>( &'lt mut self, main_file: &Path, source_map_allocator: &'source_map Bump, ) -> Result<(&'source_map SourceMap<'source_map>, Vec<Error>, Vec<Warning>)>

The main point of this module. Parses a verilog-ams source file into an ast and returns any errors that occur

§Arguments
  • main_file - The Verilog-A source file to parse

  • source_map_allocator - A bump allocator that will be used to allocate the source map. (Bump::new() can be used to create one)

§Returns
  • An Io Error if the main_file could not be read
  • A SourceMap of the parsed file generated during parsing
  • A list of all Errors that occurred during parsing
  • A list of all Warnings generated during parsing
Source

pub fn parse_from_and_print_errors<'source_map, 'lt>( &'lt mut self, main_file: &Path, source_map_allocator: &'source_map Bump, translate_lines: bool, ) -> Option<&'source_map SourceMap<'source_map>>

Parses a verilog-ams source file into an ast and prints any errors that occur

§Arguments
  • main_file - The Verilog-A source file to parse

  • source_map_allocator - A bump allocator that will be used to allocate the source map. (Bump::new() can be used to create one)

  • translate_lines - When this is set to true the line numbers of printed errors are translated to reflect the line in the original source file instead of the source that was expanded by the preprocessor

§Returns
  • Parse successful - A Source Map of the parsed source
  • Errors occurred during - Prints the errors and returns None

Trait Implementations§

Source§

impl Index<AttributeId> for Ast

Source§

type Output = Attribute

The returned type after indexing.
Source§

fn index(&self, index: AttributeId) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<BlockId> for Ast

Source§

type Output = AttributeNode<SeqBlock>

The returned type after indexing.
Source§

fn index(&self, index: BlockId) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<BranchId> for Ast

Source§

type Output = AttributeNode<BranchDeclaration>

The returned type after indexing.
Source§

fn index(&self, index: BranchId) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<DisciplineId> for Ast

Source§

type Output = AttributeNode<Discipline>

The returned type after indexing.
Source§

fn index(&self, index: DisciplineId) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<ExpressionId> for Ast

Source§

type Output = Node<Expression>

The returned type after indexing.
Source§

fn index(&self, index: ExpressionId) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<FunctionId> for Ast

Source§

type Output = AttributeNode<Function>

The returned type after indexing.
Source§

fn index(&self, index: FunctionId) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<IdRange<AttributeId>> for Ast

Source§

type Output = IndexSlice<AttributeId, [Attribute]>

The returned type after indexing.
Source§

fn index(&self, range: IdRange<AttributeId>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<IdRange<BlockId>> for Ast

Source§

type Output = IndexSlice<BlockId, [AttributeNode<SeqBlock>]>

The returned type after indexing.
Source§

fn index(&self, range: IdRange<BlockId>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<IdRange<BranchId>> for Ast

Source§

type Output = IndexSlice<BranchId, [AttributeNode<BranchDeclaration>]>

The returned type after indexing.
Source§

fn index(&self, range: IdRange<BranchId>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<IdRange<DisciplineId>> for Ast

Source§

type Output = IndexSlice<DisciplineId, [AttributeNode<Discipline>]>

The returned type after indexing.
Source§

fn index(&self, range: IdRange<DisciplineId>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<IdRange<ExpressionId>> for Ast

Source§

type Output = IndexSlice<ExpressionId, [Node<Expression>]>

The returned type after indexing.
Source§

fn index(&self, range: IdRange<ExpressionId>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<IdRange<FunctionId>> for Ast

Source§

type Output = IndexSlice<FunctionId, [AttributeNode<Function>]>

The returned type after indexing.
Source§

fn index(&self, range: IdRange<FunctionId>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<IdRange<ModuleId>> for Ast

Source§

type Output = IndexSlice<ModuleId, [AttributeNode<Module>]>

The returned type after indexing.
Source§

fn index(&self, range: IdRange<ModuleId>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<IdRange<NatureId>> for Ast

Source§

type Output = IndexSlice<NatureId, [AttributeNode<Nature>]>

The returned type after indexing.
Source§

fn index(&self, range: IdRange<NatureId>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<IdRange<NetId>> for Ast

Source§

type Output = IndexSlice<NetId, [AttributeNode<Net>]>

The returned type after indexing.
Source§

fn index(&self, range: IdRange<NetId>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<IdRange<ParameterId>> for Ast

Source§

type Output = IndexSlice<ParameterId, [AttributeNode<Parameter>]>

The returned type after indexing.
Source§

fn index(&self, range: IdRange<ParameterId>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<IdRange<PortId>> for Ast

Source§

type Output = IndexSlice<PortId, [AttributeNode<Port>]>

The returned type after indexing.
Source§

fn index(&self, range: IdRange<PortId>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<IdRange<StatementId>> for Ast

Source§

type Output = IndexSlice<StatementId, [Statement]>

The returned type after indexing.
Source§

fn index(&self, range: IdRange<StatementId>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<IdRange<VariableId>> for Ast

Source§

type Output = IndexSlice<VariableId, [AttributeNode<Variable>]>

The returned type after indexing.
Source§

fn index(&self, range: IdRange<VariableId>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<ModuleId> for Ast

Source§

type Output = AttributeNode<Module>

The returned type after indexing.
Source§

fn index(&self, index: ModuleId) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<NatureId> for Ast

Source§

type Output = AttributeNode<Nature>

The returned type after indexing.
Source§

fn index(&self, index: NatureId) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<NetId> for Ast

Source§

type Output = AttributeNode<Net>

The returned type after indexing.
Source§

fn index(&self, index: NetId) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<ParameterId> for Ast

Source§

type Output = AttributeNode<Parameter>

The returned type after indexing.
Source§

fn index(&self, index: ParameterId) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<PortId> for Ast

Source§

type Output = AttributeNode<Port>

The returned type after indexing.
Source§

fn index(&self, index: PortId) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<Range<AttributeId>> for Ast

Source§

type Output = IndexSlice<AttributeId, [Attribute]>

The returned type after indexing.
Source§

fn index(&self, range: Range<AttributeId>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<Range<BlockId>> for Ast

Source§

type Output = IndexSlice<BlockId, [AttributeNode<SeqBlock>]>

The returned type after indexing.
Source§

fn index(&self, range: Range<BlockId>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<Range<BranchId>> for Ast

Source§

type Output = IndexSlice<BranchId, [AttributeNode<BranchDeclaration>]>

The returned type after indexing.
Source§

fn index(&self, range: Range<BranchId>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<Range<DisciplineId>> for Ast

Source§

type Output = IndexSlice<DisciplineId, [AttributeNode<Discipline>]>

The returned type after indexing.
Source§

fn index(&self, range: Range<DisciplineId>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<Range<ExpressionId>> for Ast

Source§

type Output = IndexSlice<ExpressionId, [Node<Expression>]>

The returned type after indexing.
Source§

fn index(&self, range: Range<ExpressionId>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<Range<FunctionId>> for Ast

Source§

type Output = IndexSlice<FunctionId, [AttributeNode<Function>]>

The returned type after indexing.
Source§

fn index(&self, range: Range<FunctionId>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<Range<ModuleId>> for Ast

Source§

type Output = IndexSlice<ModuleId, [AttributeNode<Module>]>

The returned type after indexing.
Source§

fn index(&self, range: Range<ModuleId>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<Range<NatureId>> for Ast

Source§

type Output = IndexSlice<NatureId, [AttributeNode<Nature>]>

The returned type after indexing.
Source§

fn index(&self, range: Range<NatureId>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<Range<NetId>> for Ast

Source§

type Output = IndexSlice<NetId, [AttributeNode<Net>]>

The returned type after indexing.
Source§

fn index(&self, range: Range<NetId>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<Range<ParameterId>> for Ast

Source§

type Output = IndexSlice<ParameterId, [AttributeNode<Parameter>]>

The returned type after indexing.
Source§

fn index(&self, range: Range<ParameterId>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<Range<PortId>> for Ast

Source§

type Output = IndexSlice<PortId, [AttributeNode<Port>]>

The returned type after indexing.
Source§

fn index(&self, range: Range<PortId>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<Range<StatementId>> for Ast

Source§

type Output = IndexSlice<StatementId, [Statement]>

The returned type after indexing.
Source§

fn index(&self, range: Range<StatementId>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<Range<VariableId>> for Ast

Source§

type Output = IndexSlice<VariableId, [AttributeNode<Variable>]>

The returned type after indexing.
Source§

fn index(&self, range: Range<VariableId>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<StatementId> for Ast

Source§

type Output = Statement

The returned type after indexing.
Source§

fn index(&self, index: StatementId) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<VariableId> for Ast

Source§

type Output = AttributeNode<Variable>

The returned type after indexing.
Source§

fn index(&self, index: VariableId) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl IndexMut<AttributeId> for Ast

Source§

fn index_mut(&mut self, index: AttributeId) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<BlockId> for Ast

Source§

fn index_mut(&mut self, index: BlockId) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<BranchId> for Ast

Source§

fn index_mut(&mut self, index: BranchId) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<DisciplineId> for Ast

Source§

fn index_mut(&mut self, index: DisciplineId) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<ExpressionId> for Ast

Source§

fn index_mut(&mut self, index: ExpressionId) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<FunctionId> for Ast

Source§

fn index_mut(&mut self, index: FunctionId) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<IdRange<AttributeId>> for Ast

Source§

fn index_mut(&mut self, range: IdRange<AttributeId>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<IdRange<BlockId>> for Ast

Source§

fn index_mut(&mut self, range: IdRange<BlockId>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<IdRange<BranchId>> for Ast

Source§

fn index_mut(&mut self, range: IdRange<BranchId>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<IdRange<DisciplineId>> for Ast

Source§

fn index_mut(&mut self, range: IdRange<DisciplineId>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<IdRange<ExpressionId>> for Ast

Source§

fn index_mut(&mut self, range: IdRange<ExpressionId>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<IdRange<FunctionId>> for Ast

Source§

fn index_mut(&mut self, range: IdRange<FunctionId>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<IdRange<ModuleId>> for Ast

Source§

fn index_mut(&mut self, range: IdRange<ModuleId>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<IdRange<NatureId>> for Ast

Source§

fn index_mut(&mut self, range: IdRange<NatureId>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<IdRange<NetId>> for Ast

Source§

fn index_mut(&mut self, range: IdRange<NetId>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<IdRange<ParameterId>> for Ast

Source§

fn index_mut(&mut self, range: IdRange<ParameterId>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<IdRange<PortId>> for Ast

Source§

fn index_mut(&mut self, range: IdRange<PortId>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<IdRange<StatementId>> for Ast

Source§

fn index_mut(&mut self, range: IdRange<StatementId>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<IdRange<VariableId>> for Ast

Source§

fn index_mut(&mut self, range: IdRange<VariableId>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<ModuleId> for Ast

Source§

fn index_mut(&mut self, index: ModuleId) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<NatureId> for Ast

Source§

fn index_mut(&mut self, index: NatureId) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<NetId> for Ast

Source§

fn index_mut(&mut self, index: NetId) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<ParameterId> for Ast

Source§

fn index_mut(&mut self, index: ParameterId) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<PortId> for Ast

Source§

fn index_mut(&mut self, index: PortId) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<Range<AttributeId>> for Ast

Source§

fn index_mut(&mut self, range: Range<AttributeId>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<Range<BlockId>> for Ast

Source§

fn index_mut(&mut self, range: Range<BlockId>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<Range<BranchId>> for Ast

Source§

fn index_mut(&mut self, range: Range<BranchId>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<Range<DisciplineId>> for Ast

Source§

fn index_mut(&mut self, range: Range<DisciplineId>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<Range<ExpressionId>> for Ast

Source§

fn index_mut(&mut self, range: Range<ExpressionId>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<Range<FunctionId>> for Ast

Source§

fn index_mut(&mut self, range: Range<FunctionId>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<Range<ModuleId>> for Ast

Source§

fn index_mut(&mut self, range: Range<ModuleId>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<Range<NatureId>> for Ast

Source§

fn index_mut(&mut self, range: Range<NatureId>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<Range<NetId>> for Ast

Source§

fn index_mut(&mut self, range: Range<NetId>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<Range<ParameterId>> for Ast

Source§

fn index_mut(&mut self, range: Range<ParameterId>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<Range<PortId>> for Ast

Source§

fn index_mut(&mut self, range: Range<PortId>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<Range<StatementId>> for Ast

Source§

fn index_mut(&mut self, range: Range<StatementId>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<Range<VariableId>> for Ast

Source§

fn index_mut(&mut self, range: Range<VariableId>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<StatementId> for Ast

Source§

fn index_mut(&mut self, index: StatementId) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<VariableId> for Ast

Source§

fn index_mut(&mut self, index: VariableId) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more

Auto Trait Implementations§

§

impl Freeze for Ast

§

impl RefUnwindSafe for Ast

§

impl Send for Ast

§

impl Sync for Ast

§

impl Unpin for Ast

§

impl UnwindSafe for Ast

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.