[][src]Trait show_notes::e009::ASimpleTrait

pub trait ASimpleTrait {
    fn get_some_integer(&self) -> i64;

    fn a_default_print(&self) -> &str { ... }

Define a simple trait so we can see how it works.

Note that its a_default_print() method becomes available automatically for DoubleAndOne when we impl ASimpleTrait for DoubleAndOne below.

Required methods

fn get_some_integer(&self) -> i64

Have the item return an integer.

Loading content...

Provided methods

fn a_default_print(&self) -> &str

Have the item print and then return some string.

Loading content...


impl ASimpleTrait for DoubleAndOne[src]

Loading content...