Trait svd_parser::Parse

source ·
pub trait Parse {
    type Object;
    type Error;
    type Config;

    // Required method
    fn parse(
        elem: &Node<'_, '_>,
        config: &Self::Config
    ) -> Result<Self::Object, Self::Error>;
}
Expand description

Parse trait allows SVD objects to be parsed from XML elements.

Required Associated Types§

source

type Object

Object returned by parse method

source

type Error

Parsing error

source

type Config

Advanced parse options

Required Methods§

source

fn parse( elem: &Node<'_, '_>, config: &Self::Config ) -> Result<Self::Object, Self::Error>

Parse an XML/SVD element into it’s corresponding Object.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Parse for Access

§

type Object = Access

§

type Error = SVDErrorAt

§

type Config = Config

source§

fn parse( tree: &Node<'_, '_>, _config: &Self::Config ) -> Result<Self, Self::Error>

source§

impl Parse for AddressBlockUsage

§

type Object = AddressBlockUsage

§

type Error = SVDErrorAt

§

type Config = Config

source§

fn parse( tree: &Node<'_, '_>, _config: &Self::Config ) -> Result<Self, Self::Error>

source§

impl Parse for Endian

§

type Object = Endian

§

type Error = SVDErrorAt

§

type Config = Config

source§

fn parse( tree: &Node<'_, '_>, _config: &Self::Config ) -> Result<Self, Self::Error>

source§

impl Parse for ModifiedWriteValues

§

type Object = ModifiedWriteValues

§

type Error = SVDErrorAt

§

type Config = Config

source§

fn parse( tree: &Node<'_, '_>, _config: &Self::Config ) -> Result<Self, Self::Error>

source§

impl Parse for Protection

§

type Object = Protection

§

type Error = SVDErrorAt

§

type Config = Config

source§

fn parse( tree: &Node<'_, '_>, _config: &Self::Config ) -> Result<Self, Self::Error>

source§

impl Parse for ReadAction

§

type Object = ReadAction

§

type Error = SVDErrorAt

§

type Config = Config

source§

fn parse( tree: &Node<'_, '_>, _config: &Self::Config ) -> Result<Self, Self::Error>

source§

impl Parse for RegisterCluster

§

type Object = RegisterCluster

§

type Error = SVDErrorAt

§

type Config = Config

source§

fn parse( tree: &Node<'_, '_>, config: &Self::Config ) -> Result<Self, Self::Error>

source§

impl Parse for Usage

§

type Object = Usage

§

type Error = SVDErrorAt

§

type Config = Config

source§

fn parse( tree: &Node<'_, '_>, _config: &Self::Config ) -> Result<Self, Self::Error>

source§

impl Parse for WriteConstraint

§

type Object = WriteConstraint

§

type Error = SVDErrorAt

§

type Config = Config

source§

fn parse( tree: &Node<'_, '_>, _config: &Self::Config ) -> Result<Self, Self::Error>

source§

impl Parse for u32

§

type Object = u32

§

type Error = SVDErrorAt

§

type Config = ()

source§

fn parse( tree: &Node<'_, '_>, _config: &Self::Config ) -> Result<u32, Self::Error>

source§

impl Parse for u64

§

type Object = u64

§

type Error = SVDErrorAt

§

type Config = ()

source§

fn parse( tree: &Node<'_, '_>, _config: &Self::Config ) -> Result<u64, Self::Error>

source§

impl Parse for AddressBlock

§

type Object = AddressBlock

§

type Error = SVDErrorAt

§

type Config = Config

source§

fn parse( tree: &Node<'_, '_>, config: &Self::Config ) -> Result<Self, Self::Error>

source§

impl Parse for BitRange

§

type Object = BitRange

§

type Error = SVDErrorAt

§

type Config = Config

source§

fn parse( tree: &Node<'_, '_>, _config: &Self::Config ) -> Result<Self, Self::Error>

source§

impl Parse for ClusterInfo

§

type Object = ClusterInfo

§

type Error = SVDErrorAt

§

type Config = Config

source§

fn parse( tree: &Node<'_, '_>, config: &Self::Config ) -> Result<Self, Self::Error>

source§

impl Parse for Cpu

§

type Object = Cpu

§

type Error = SVDErrorAt

§

type Config = Config

source§

fn parse(tree: &Node<'_, '_>, config: &Config) -> Result<Self, Self::Error>

source§

impl Parse for Device

Parses a SVD file

§

type Object = Device

§

type Error = SVDErrorAt

§

type Config = Config

source§

fn parse( tree: &Node<'_, '_>, config: &Self::Config ) -> Result<Self, Self::Error>

source§

impl Parse for DimArrayIndex

§

type Object = DimArrayIndex

§

type Error = SVDErrorAt

§

type Config = Config

source§

fn parse( tree: &Node<'_, '_>, config: &Self::Config ) -> Result<Self, Self::Error>

source§

impl Parse for DimElement

§

type Object = DimElement

§

type Error = SVDErrorAt

§

type Config = Config

source§

fn parse( tree: &Node<'_, '_>, config: &Self::Config ) -> Result<Self, Self::Error>

source§

impl Parse for EnumeratedValue

§

type Object = EnumeratedValue

§

type Error = SVDErrorAt

§

type Config = Config

source§

fn parse( tree: &Node<'_, '_>, config: &Self::Config ) -> Result<Self, Self::Error>

source§

impl Parse for EnumeratedValues

§

type Object = EnumeratedValues

§

type Error = SVDErrorAt

§

type Config = Config

source§

fn parse( tree: &Node<'_, '_>, config: &Self::Config ) -> Result<Self, Self::Error>

source§

impl Parse for FieldInfo

§

type Object = FieldInfo

§

type Error = SVDErrorAt

§

type Config = Config

source§

fn parse( tree: &Node<'_, '_>, config: &Self::Config ) -> Result<Self, Self::Error>

source§

impl Parse for Interrupt

§

type Object = Interrupt

§

type Error = SVDErrorAt

§

type Config = Config

source§

fn parse( tree: &Node<'_, '_>, config: &Self::Config ) -> Result<Self, Self::Error>

source§

impl Parse for PeripheralInfo

§

type Object = PeripheralInfo

§

type Error = SVDErrorAt

§

type Config = Config

source§

fn parse( tree: &Node<'_, '_>, config: &Self::Config ) -> Result<Self, Self::Error>

source§

impl Parse for RegisterInfo

§

type Object = RegisterInfo

§

type Error = SVDErrorAt

§

type Config = Config

source§

fn parse( tree: &Node<'_, '_>, config: &Self::Config ) -> Result<Self, Self::Error>

source§

impl Parse for RegisterProperties

§

type Object = RegisterProperties

§

type Error = SVDErrorAt

§

type Config = Config

source§

fn parse( tree: &Node<'_, '_>, config: &Self::Config ) -> Result<Self, Self::Error>

source§

impl Parse for WriteConstraintRange

§

type Object = WriteConstraintRange

§

type Error = SVDErrorAt

§

type Config = ()

source§

fn parse( tree: &Node<'_, '_>, _config: &Self::Config ) -> Result<Self, Self::Error>

source§

impl Parse for Cluster

§

type Object = MaybeArray<ClusterInfo>

§

type Error = SVDErrorAt

§

type Config = Config

source§

fn parse( tree: &Node<'_, '_>, config: &Self::Config ) -> Result<Self, Self::Error>

source§

impl Parse for Field

§

type Object = MaybeArray<FieldInfo>

§

type Error = SVDErrorAt

§

type Config = Config

source§

fn parse( tree: &Node<'_, '_>, config: &Self::Config ) -> Result<Self, Self::Error>

source§

impl Parse for Peripheral

§

type Object = MaybeArray<PeripheralInfo>

§

type Error = SVDErrorAt

§

type Config = Config

source§

fn parse( tree: &Node<'_, '_>, config: &Self::Config ) -> Result<Self, Self::Error>

source§

impl Parse for Register

§

type Object = MaybeArray<RegisterInfo>

§

type Error = SVDErrorAt

§

type Config = Config

source§

fn parse( tree: &Node<'_, '_>, config: &Self::Config ) -> Result<Self, Self::Error>

Implementors§