[][src]Trait dustr::types::Behavior

pub trait Behavior: Sync + Send {
    fn is(&self, sty: &Type) -> bool;
fn imports(&self, sty: &Type, pkg: &str, crate_name: &str) -> Vec<String>;
fn name(&self, sty: &Type) -> String;
fn ffi(&self, sty: &Type) -> String;
fn native(&self, sty: &Type) -> String;
fn native_to_ffi(&self, sty: &Type, expr: String) -> String;
fn ffi_to_native(&self, sty: &Type, expr: String) -> String; fn shim(&self, sty: &Type) -> String { ... } }

The behavior of a Type as needed to generate its dart code.

Required methods

fn is(&self, sty: &Type) -> bool

fn imports(&self, sty: &Type, pkg: &str, crate_name: &str) -> Vec<String>

fn name(&self, sty: &Type) -> String

fn ffi(&self, sty: &Type) -> String

fn native(&self, sty: &Type) -> String

fn native_to_ffi(&self, sty: &Type, expr: String) -> String

fn ffi_to_native(&self, sty: &Type, expr: String) -> String

Loading content...

Provided methods

fn shim(&self, sty: &Type) -> String

Loading content...

Implementors

impl Behavior for dustr::types::BehaviorBool[src]

impl Behavior for dustr::types::BehaviorDuration[src]

impl Behavior for dustr::types::BehaviorForeign[src]

impl Behavior for dustr::types::BehaviorOption[src]

impl Behavior for dustr::types::BehaviorReference[src]

impl Behavior for dustr::types::BehaviorResult[src]

impl Behavior for dustr::types::BehaviorScalars[src]

impl Behavior for dustr::types::BehaviorString[src]

impl Behavior for dustr::types::BehaviorVec[src]

Loading content...