faux 0.1.13

A library to mock structs
Documentation
use std::{error::Error, rc::Rc, result::Result, sync::Arc};

#[faux::create]
pub struct Foo;

#[faux::methods]
impl Foo {
    pub fn self_self() -> (Self, Self) {
        (Foo, Foo)
    }

    pub fn self_path() -> (Self, i32) {
        (Foo, 1)
    }

    pub fn self_box() -> (Self, Box<Self>) {
        (Foo, Box::new(Foo))
    }

    pub fn self_rc() -> (Self, Rc<Self>) {
        (Foo, Rc::new(Foo))
    }

    pub fn self_arc() -> (Self, Arc<Self>) {
        (Foo, Arc::new(Foo))
    }

    pub fn self_result() -> (Self, Result<Self, Box<dyn Error>>) {
        (Foo, Ok(Foo))
    }

    pub fn self_option() -> (Self, Option<Self>) {
        (Foo, Some(Foo))
    }
}