summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-12-12 09:18:23 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-12-12 09:18:23 -0800
commit5319ce3a7dc4d417af9d94b8671c41ad43018b10 (patch)
tree0f1805082771798872805e3b680215050c29f67b /src
parent982dc47a45a5a2d66ea092ee6bb9503ddcbf36d9 (diff)
downloadssh2-rs-5319ce3a7dc4d417af9d94b8671c41ad43018b10.zip
Update to rust master
Diffstat (limited to 'src')
-rw-r--r--src/channel.rs2
-rw-r--r--src/lib.rs8
-rw-r--r--src/sftp.rs4
3 files changed, 14 insertions, 0 deletions
diff --git a/src/channel.rs b/src/channel.rs
index 6f951f2..bed303f 100644
--- a/src/channel.rs
+++ b/src/channel.rs
@@ -29,6 +29,7 @@ pub struct ExitSignal {
}
/// Description of the read window as returned by `Channel::read_window`
+#[deriving(Copy)]
pub struct ReadWindow {
/// The number of bytes which the remote end may send without overflowing
/// the window limit.
@@ -40,6 +41,7 @@ pub struct ReadWindow {
}
/// Description of the write window as returned by `Channel::write_window`
+#[deriving(Copy)]
pub struct WriteWindow {
/// The number of bytes which may be safely written on the channel without
/// blocking.
diff --git a/src/lib.rs b/src/lib.rs
index a212626..db3c428 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -149,6 +149,7 @@ unsafe fn opt_bytes<'a, T>(_: &'a T,
}
#[allow(missing_docs)]
+#[deriving(Copy)]
pub enum DisconnectCode {
HostNotAllowedToConnect =
raw::SSH_DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT as int,
@@ -171,6 +172,7 @@ pub enum DisconnectCode {
}
/// Flags to be enabled/disabled on a Session
+#[deriving(Copy)]
pub enum SessionFlag {
/// If set, libssh2 will not attempt to block SIGPIPEs but will let them
/// trigger from the underlying socket layer.
@@ -183,6 +185,7 @@ pub enum SessionFlag {
}
#[allow(missing_docs)]
+#[deriving(Copy)]
pub enum HostKeyType {
Unknown = raw::LIBSSH2_HOSTKEY_TYPE_UNKNOWN as int,
Rsa = raw::LIBSSH2_HOSTKEY_TYPE_RSA as int,
@@ -190,6 +193,7 @@ pub enum HostKeyType {
}
#[allow(missing_docs)]
+#[deriving(Copy)]
pub enum MethodType {
Kex = raw::LIBSSH2_METHOD_KEX as int,
HostKey = raw::LIBSSH2_METHOD_HOSTKEY as int,
@@ -212,17 +216,20 @@ pub static FLUSH_ALL: uint = -2;
pub static EXTENDED_DATA_STDERR: uint = 1;
#[allow(missing_docs)]
+#[deriving(Copy)]
pub enum HashType {
Md5 = raw::LIBSSH2_HOSTKEY_HASH_MD5 as int,
Sha1 = raw:: LIBSSH2_HOSTKEY_HASH_SHA1 as int,
}
#[allow(missing_docs)]
+#[deriving(Copy)]
pub enum KnownHostFileKind {
OpenSSH = raw::LIBSSH2_KNOWNHOST_FILE_OPENSSH as int,
}
/// Possible results of a call to `KnownHosts::check`
+#[deriving(Copy)]
pub enum CheckResult {
/// Hosts and keys match
Match = raw::LIBSSH2_KNOWNHOST_CHECK_MATCH as int,
@@ -235,6 +242,7 @@ pub enum CheckResult {
}
#[allow(missing_docs)]
+#[deriving(Copy)]
pub enum KnownHostKeyFormat {
Rsa1 = raw::LIBSSH2_KNOWNHOST_KEY_RSA1 as int,
SshRsa = raw::LIBSSH2_KNOWNHOST_KEY_SSHRSA as int,
diff --git a/src/sftp.rs b/src/sftp.rs
index f5d042f..d79de74 100644
--- a/src/sftp.rs
+++ b/src/sftp.rs
@@ -31,6 +31,7 @@ pub struct File<'a> {
/// Metadata information about a remote file.
///
/// Fields are not necessarily all provided
+#[allow(missing_copy_implementations)]
pub struct FileStat {
/// File size, in bytes of the file.
pub size: Option<u64>,
@@ -48,6 +49,7 @@ pub struct FileStat {
bitflags! {
#[doc = "Options that can be used to configure how a file is opened"]
+ #[deriving(Copy)]
flags OpenFlags: c_ulong {
#[doc = "Open the file for reading."]
const READ = raw::LIBSSH2_FXF_READ,
@@ -73,6 +75,7 @@ bitflags! {
bitflags! {
#[doc = "Options to `Sftp::rename`"]
+ #[deriving(Copy)]
flags RenameFlags: c_long {
#[doc = "In a rename operation, overwrite the destination if it \
already exists. If this flag is not present then it is an \
@@ -88,6 +91,7 @@ bitflags! {
}
/// How to open a file handle with libssh2.
+#[deriving(Copy)]
pub enum OpenType {
/// Specify that a file shoud be opened.
File = raw::LIBSSH2_SFTP_OPENFILE as int,