diff --git a/src/context.rs b/src/context.rs index 4d41a4e..de8350f 100644 --- a/src/context.rs +++ b/src/context.rs @@ -8,7 +8,7 @@ mod sealed { } /// For logging a [Result] when an [Err] is encountered. -#[cfg_attr(docsrs, doc(cfg(any(feature = "tracing", feature = "log"))))] +#[cfg_attr(docsrs, doc(cfg(any(feature = "tracing", feature = "log", feature = "context_stub"))))] pub trait ResultContext: sealed::Sealed { /// Log the context as an "error" if the Result is an [Err]. fn error(self, context: impl Display) -> Result; @@ -45,7 +45,7 @@ pub trait ResultContext: sealed::Sealed { } /// For logging a [Result]'s [Err] in the [Debug] format when an [Err] is encountered. -#[cfg_attr(docsrs, doc(cfg(any(feature = "tracing", feature = "log"))))] +#[cfg_attr(docsrs, doc(cfg(any(feature = "tracing", feature = "log", feature = "context_stub"))))] pub trait ConsumeDebug: sealed::Sealed { /// Consumes the [Err] of a Result. if [Err], logging as an "error". fn consume_error(self) -> Option; @@ -60,7 +60,7 @@ pub trait ConsumeDebug: sealed::Sealed { } /// For logging a [Result]'s [Err] in the [Display] format when an [Err] is encountered. -#[cfg_attr(docsrs, doc(cfg(any(feature = "tracing", feature = "log"))))] +#[cfg_attr(docsrs, doc(cfg(any(feature = "tracing", feature = "log", feature = "context_stub"))))] pub trait ConsumeDisplay: sealed::Sealed { /// Consumes the [Err] of a Result. if [Err], logging as an "error". fn consume_error(self) -> Option; @@ -75,7 +75,7 @@ pub trait ConsumeDisplay: sealed::Sealed { } /// For logging when a [None] is encountered. -#[cfg_attr(docsrs, doc(cfg(any(feature = "tracing", feature = "log"))))] +#[cfg_attr(docsrs, doc(cfg(any(feature = "tracing", feature = "log", feature = "context_stub"))))] pub trait OptionContext: sealed::Sealed { /// Log the context as an "error" if the Option is [None]. fn error(self, context: impl Display) -> Option;