spdlog-rs 0.5.3

Fast, highly configurable Rust logging crate, inspired by the C++ logging library spdlog
Documentation
use std::marker::PhantomData;

use crate::{
    formatter::{Formatter, FormatterContext},
    Record, StringBuf,
};

#[derive(Clone)]
pub(crate) struct UnreachableFormatter(PhantomData<()>);

impl UnreachableFormatter {
    pub(crate) fn new() -> Self {
        Self(PhantomData)
    }
}

impl Formatter for UnreachableFormatter {
    fn format(
        &self,
        _record: &Record,
        _dest: &mut StringBuf,
        _ctx: &mut FormatterContext,
    ) -> crate::Result<()> {
        unreachable!()
    }
}