2018-04-02 18:52:04 +02:00
|
|
|
#![crate_name = "foo"]
|
|
|
|
|
2024-06-21 14:03:08 +02:00
|
|
|
//@ has foo/trait.Foo.html '//a[@href="trait.Foo.html#tymethod.req"]' 'req'
|
|
|
|
//@ has foo/trait.Foo.html '//a[@href="trait.Foo.html#method.prov"]' 'prov'
|
2018-04-02 18:52:04 +02:00
|
|
|
|
|
|
|
/// Always make sure to implement [`req`], but you don't have to implement [`prov`].
|
|
|
|
///
|
|
|
|
/// [`req`]: Foo::req
|
|
|
|
/// [`prov`]: Foo::prov
|
|
|
|
pub trait Foo {
|
|
|
|
/// Required
|
|
|
|
fn req();
|
|
|
|
/// Provided
|
|
|
|
fn prov() {}
|
|
|
|
}
|