use std::{convert, fmt};
use crate::Flavor;
#[derive(Default, Clone)]
pub struct Guard {
_private: (),
}
impl fmt::Debug for Guard {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
f.debug_struct("Guard")
.field("flavor()", &self.flavor())
.finish()
}
}
impl Guard {
pub const FLAVOR: Flavor = Flavor::Noop;
pub fn try_new() -> Result<Self, convert::Infallible> {
Ok(Default::default())
}
#[inline(always)]
pub fn detected_fork(&mut self) -> bool {
false
}
pub fn flavor(&self) -> Flavor {
Self::FLAVOR.clone()
}
}