rust private super trait

pub(crate) mod private {

    #[doc(hidden)]
    pub trait FooPrivate<Arg> {
        fn foo(&self, arg: Arg);
    }

}

pub trait Foo<Arg>: private::FooPrivate<Arg> {

    /* other public methods */

}

原文:https://jack.wrenn.fyi/blog/private-trait-methods/

posted @ 2024-09-28 14:09  寻找繁星  阅读(0)  评论(0编辑  收藏  举报