1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//! Errors associated with consumer

/// The offset string is empty
#[derive(Debug)]
pub struct OffsetIsEmpty;

impl From<OffsetIsEmpty> for azure_core::Error {
    fn from(error: OffsetIsEmpty) -> Self {
        azure_core::Error::new(azure_core::error::ErrorKind::Other, error)
    }
}

impl std::fmt::Display for OffsetIsEmpty {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "offset must not be empty or whitespace")
    }
}

impl std::error::Error for OffsetIsEmpty {}