1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*!
Examples of `#[sabi_trait]` generated trait objects,for the documentation.
*/

use crate::sabi_trait;

/// An example trait,used to show what `#[sabi_trait]` generates in the docs.
#[sabi_trait]
#[sabi(use_dyn_trait)]
pub trait ConstExample:Debug+Clone{
    #[sabi(last_prefix_field)]
    fn next_number(&self,num:usize)->usize;
}

impl ConstExample for usize{
    fn next_number(&self,num:usize)->usize{
        self+num
    }
}



#[sabi_trait]
#[doc(hidden)]
pub trait DocHiddenTrait{}