docsrs_test/
lib.rs

1//! This is a dummy package to test
2//! [[package.metadata.docs.rs]](https://github.com/onur/docs.rs/pull/73).
3
4
5extern crate serde;
6
7/// This function is only available on feature1
8#[cfg(feature="feature1")]
9pub fn feature1() {}
10
11/// This function is only available on feature2
12#[cfg(feature="feature2")]
13pub fn feature2() {}
14
15/// This function is only available on feature3
16#[cfg(feature="feature3")]
17pub fn feature3() {}
18
19/// This function is only available on i686 unix systems
20#[cfg(all(unix, target_pointer_width = "32"))]
21pub fn i386_only_func() {}
22
23
24
25/// This is a demostration to external links
26pub struct MyStruct<T: serde::Serialize> {
27    pub trait_from_serde: T,
28
29    
30}
31
32/// Some private const
33const PRIVATE_CONST: bool = true;