]> git.proxmox.com Git - rustc.git/blob - src/libstd/sys/common/mod.rs
Imported Upstream version 1.1.0+dfsg1
[rustc.git] / src / libstd / sys / common / mod.rs
1 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 #![allow(missing_docs)]
12
13 use prelude::v1::*;
14
15 pub mod backtrace;
16 pub mod condvar;
17 pub mod mutex;
18 pub mod net;
19 pub mod poison;
20 pub mod remutex;
21 pub mod rwlock;
22 pub mod stack;
23 pub mod thread;
24 pub mod thread_info;
25 pub mod thread_local;
26 pub mod wtf8;
27
28 // common error constructors
29
30 /// A trait for viewing representations from std types
31 #[doc(hidden)]
32 pub trait AsInner<Inner: ?Sized> {
33 fn as_inner(&self) -> &Inner;
34 }
35
36 /// A trait for viewing representations from std types
37 #[doc(hidden)]
38 pub trait AsInnerMut<Inner: ?Sized> {
39 fn as_inner_mut(&mut self) -> &mut Inner;
40 }
41
42 /// A trait for extracting representations from std types
43 #[doc(hidden)]
44 pub trait IntoInner<Inner> {
45 fn into_inner(self) -> Inner;
46 }
47
48 /// A trait for creating std types from internal representations
49 #[doc(hidden)]
50 pub trait FromInner<Inner> {
51 fn from_inner(inner: Inner) -> Self;
52 }