diff options
Diffstat (limited to 'src/libstd/io/mod.rs')
| -rw-r--r-- | src/libstd/io/mod.rs | 17 | 
1 files changed, 17 insertions, 0 deletions
| diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index d43a7a66c5b..dc212e7cab3 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -231,6 +231,7 @@ use error::{FromError, Error}; use fmt; use int; use iter::{Iterator, IteratorExt}; +use kinds::Copy; use mem::transmute; use ops::{BitOr, BitXor, BitAnd, Sub, Not}; use option::Option; @@ -420,6 +421,8 @@ pub enum IoErrorKind { NoProgress, } +impl Copy for IoErrorKind {} + /// A trait that lets you add a `detail` to an IoError easily trait UpdateIoError<T> { /// Returns an IoError with updated description and detail @@ -1560,6 +1563,8 @@ pub enum SeekStyle { SeekCur, } +impl Copy for SeekStyle {} + /// An object implementing `Seek` internally has some form of cursor which can /// be moved within a stream of bytes. The stream typically has a fixed size, /// allowing seeking relative to either end. @@ -1682,6 +1687,8 @@ pub enum FileMode { Truncate, } +impl Copy for FileMode {} + /// Access permissions with which the file should be opened. `File`s /// opened with `Read` will return an error if written to. pub enum FileAccess { @@ -1693,6 +1700,8 @@ pub enum FileAccess { ReadWrite, } +impl Copy for FileAccess {} + /// Different kinds of files which can be identified by a call to stat #[deriving(PartialEq, Show, Hash, Clone)] pub enum FileType { @@ -1715,6 +1724,8 @@ pub enum FileType { Unknown, } +impl Copy for FileType {} + /// A structure used to describe metadata information about a file. This /// structure is created through the `stat` method on a `Path`. /// @@ -1766,6 +1777,8 @@ pub struct FileStat { pub unstable: UnstableFileStat, } +impl Copy for FileStat {} + /// This structure represents all of the possible information which can be /// returned from a `stat` syscall which is not contained in the `FileStat` /// structure. This information is not necessarily platform independent, and may @@ -1795,6 +1808,8 @@ pub struct UnstableFileStat { pub gen: u64, } +impl Copy for UnstableFileStat {} + bitflags! { #[doc = "A set of permissions for a file or directory is represented"] #[doc = "by a set of flags which are or'd together."] @@ -1889,6 +1904,8 @@ bitflags! { } } +impl Copy for FilePermission {} + impl Default for FilePermission { #[inline] fn default() -> FilePermission { FilePermission::empty() } | 
