Trait tcgeneric::NativeClass[][src]

pub trait NativeClass: Class {
    fn from_path(path: &[PathSegment]) -> Option<Self>;
fn path(&self) -> TCPathBuf; }
Expand description

A generic native (i.e. implemented in Rust) class trait

Required methods

fn from_path(path: &[PathSegment]) -> Option<Self>[src]

Given a fully qualified path, return this class, or a subclass.

Example:

assert_eq!(
    Number::from_path("/state/scalar/value/number/int/32"),
    NumberType::Int(IntType::I32));

fn path(&self) -> TCPathBuf[src]

Returns the fully-qualified path of this class.

Implementors