celery_rs_core/amqp/
queue_error.rs

1/*
2Error for use when queue functions fail
3
4Author Andrew Evans
5*/
6
7use std::fmt;
8
9
10/// Thrown when the connection pool is empty
11pub struct QueueError;
12
13
14/// Display implementation for when the pool is empty
15impl fmt::Display for QueueError{
16
17    ///Display the standard error message
18    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
19        write!(f, "Queue Operation Failed.")
20    }
21}
22
23
24/// Debut for PoolIsEmptyError
25impl fmt::Debug for QueueError{
26
27    /// Display the debug information for the programmer
28    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
29        write!(f, "{{ file: {}, line: {} }}", file!(), line!()) // programmer-facing output
30    }
31}