1 //! Types which are documented locally in the Tokio crate, but does not actually 2 //! live here. 3 //! 4 //! **Note** this module is only visible on docs.rs, you cannot use it directly 5 //! in your own code. 6 7 /// The name of a type which is not defined here. 8 /// 9 /// This is typically used as an alias for another type, like so: 10 /// 11 /// ```rust,ignore 12 /// /// See [some::other::location](https://example.com). 13 /// type DEFINED_ELSEWHERE = crate::doc::NotDefinedHere; 14 /// ``` 15 /// 16 /// This type is uninhabitable like the [`never` type] to ensure that no one 17 /// will ever accidentally use it. 18 /// 19 /// [`never` type]: https://doc.rust-lang.org/std/primitive.never.html 20 #[derive(Debug)] 21 pub enum NotDefinedHere {} 22 23 #[cfg(feature = "net")] 24 impl mio::event::Source for NotDefinedHere { register( &mut self, registry: &mio::Registry, token: mio::Token, interests: mio::Interest, ) -> std::io::Result<()>25 fn register( 26 &mut self, 27 registry: &mio::Registry, 28 token: mio::Token, 29 interests: mio::Interest, 30 ) -> std::io::Result<()> { 31 Ok(()) 32 } reregister( &mut self, registry: &mio::Registry, token: mio::Token, interests: mio::Interest, ) -> std::io::Result<()>33 fn reregister( 34 &mut self, 35 registry: &mio::Registry, 36 token: mio::Token, 37 interests: mio::Interest, 38 ) -> std::io::Result<()> { 39 Ok(()) 40 } deregister(&mut self, registry: &mio::Registry) -> std::io::Result<()>41 fn deregister(&mut self, registry: &mio::Registry) -> std::io::Result<()> { 42 Ok(()) 43 } 44 } 45 46 #[cfg(any(feature = "net", feature = "fs"))] 47 pub mod os; 48