Sander Maijers 2017-10-19 15:32:48 +02:00 committed by Jon Gjengset
parent 0779d3b15e
commit dc7ad26ac1
No known key found for this signature in database
GPG key ID: D64AC9D67176DC71
3 changed files with 4 additions and 1 deletions

View file

@ -16,6 +16,7 @@ const CR: u8 = 0x0d;
const LF: u8 = 0x0a; const LF: u8 = 0x0a;
/// Stream to interface with the IMAP server. This interface is only for the command stream. /// Stream to interface with the IMAP server. This interface is only for the command stream.
#[derive(Debug)]
pub struct Client<T: Read + Write> { pub struct Client<T: Read + Write> {
stream: BufStream<T>, stream: BufStream<T>,
tag: u32, tag: u32,
@ -28,6 +29,7 @@ pub struct Client<T: Read + Write> {
/// 2177](https://tools.ietf.org/html/rfc2177). /// 2177](https://tools.ietf.org/html/rfc2177).
/// ///
/// As long a the handle is active, the mailbox cannot be otherwise accessed. /// As long a the handle is active, the mailbox cannot be otherwise accessed.
#[derive(Debug)]
pub struct IdleHandle<'a, T: Read + Write + 'a> { pub struct IdleHandle<'a, T: Read + Write + 'a> {
client: &'a mut Client<T>, client: &'a mut Client<T>,
keepalive: Duration, keepalive: Duration,

View file

@ -1,6 +1,6 @@
use std::fmt; use std::fmt;
#[derive(Eq, PartialEq)] #[derive(Clone, Debug, Eq, Ord, PartialEq, PartialOrd, Hash)]
pub struct Mailbox { pub struct Mailbox {
pub flags: String, pub flags: String,
pub exists: u32, pub exists: u32,

View file

@ -1,6 +1,7 @@
use std::io::{Error, ErrorKind, Read, Result, Write}; use std::io::{Error, ErrorKind, Read, Result, Write};
use std::cmp::min; use std::cmp::min;
#[derive(Clone, Debug, Eq, Ord, PartialEq, PartialOrd, Hash)]
pub struct MockStream { pub struct MockStream {
read_buf: Vec<u8>, read_buf: Vec<u8>,
read_pos: usize, read_pos: usize,