1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
use maidsafe_utilities::serialisation::SerialisationError;
use mio::timer::TimerError;
use std::io;
use udt_extern::UdtError;
quick_error! {
#[derive(Debug)]
pub enum SocketError {
Io(e: io::Error) {
description(e.description())
display("Io error: {}", e)
cause(e)
from()
}
UninitialisedSocket {
description("Socket is uninitialised and invalid for any operation")
display("Socket is uninitialised and invalid for any operation")
}
PayloadSizeProhibitive {
description("Payload is too large")
}
Serialisation(e: SerialisationError) {
description(e.description())
display("Serialisation error: {}", e)
cause(e)
from()
}
Timer(e: TimerError) {
description(e.description())
display("Timer error: {}", e)
cause(e)
from()
}
ZeroByteRead {
description("Read zero bytes from the socket - indicates EOF")
}
Udt(e: UdtError) {
description(&e.err_msg)
display("Udt error: {}", e.err_msg)
from()
}
NoUdtEpoll {
description("No UDT Epoll while registering/deregistering !")
}
}
}