[go: up one dir, main page]

tower 0.4.3

Tower is a library of modular and reusable components for building robust clients and servers.
Documentation
use std::{error, fmt};

/// Error returned if the inner [`Service`] has not been set.
///
/// [`Service`]: crate::Service
#[derive(Debug)]
pub struct None(());

impl None {
    pub(crate) fn new() -> None {
        None(())
    }
}

impl fmt::Display for None {
    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
        write!(fmt, "None")
    }
}

impl error::Error for None {}