AttrScalarType

Trait AttrScalarType 

Source
pub trait AttrScalarType<'a>: 'a + Sized {
    // Required method
    fn get_attr_opt_scalar(
        node: &'a NodeProto,
        name: &str,
    ) -> TractResult<Option<Self>>;
}

Required Methods§

Source

fn get_attr_opt_scalar( node: &'a NodeProto, name: &str, ) -> TractResult<Option<Self>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a> AttrScalarType<'a> for &'a str

Source§

fn get_attr_opt_scalar( node: &'a NodeProto, name: &str, ) -> TractResult<Option<Self>>

Source§

impl<'a> AttrScalarType<'a> for &'a [u8]

Source§

fn get_attr_opt_scalar( node: &'a NodeProto, name: &str, ) -> TractResult<Option<Self>>

Source§

impl<'a> AttrScalarType<'a> for bool

Source§

fn get_attr_opt_scalar( node: &'a NodeProto, name: &str, ) -> TractResult<Option<Self>>

Source§

impl<'a> AttrScalarType<'a> for f32

Source§

fn get_attr_opt_scalar( node: &'a NodeProto, name: &str, ) -> TractResult<Option<Self>>

Source§

impl<'a> AttrScalarType<'a> for i8

Source§

fn get_attr_opt_scalar( node: &'a NodeProto, name: &str, ) -> TractResult<Option<Self>>

Source§

impl<'a> AttrScalarType<'a> for i16

Source§

fn get_attr_opt_scalar( node: &'a NodeProto, name: &str, ) -> TractResult<Option<Self>>

Source§

impl<'a> AttrScalarType<'a> for i32

Source§

fn get_attr_opt_scalar( node: &'a NodeProto, name: &str, ) -> TractResult<Option<Self>>

Source§

impl<'a> AttrScalarType<'a> for i64

Source§

fn get_attr_opt_scalar( node: &'a NodeProto, name: &str, ) -> TractResult<Option<Self>>

Source§

impl<'a> AttrScalarType<'a> for isize

Source§

fn get_attr_opt_scalar( node: &'a NodeProto, name: &str, ) -> TractResult<Option<Self>>

Source§

impl<'a> AttrScalarType<'a> for usize

Source§

fn get_attr_opt_scalar( node: &'a NodeProto, name: &str, ) -> TractResult<Option<Self>>

Implementors§