use std::convert::Infallible;
use std::fmt;
use std::fmt::{Display, Formatter};
#[cfg(feature = "base-model")]
pub mod base_model;
#[cfg(feature = "tokio")]
pub mod cache;
#[cfg(feature = "protobuf")]
pub mod client;
#[cfg(feature = "config")]
pub mod config;
pub mod golem_version;
#[cfg(feature = "protobuf")]
pub mod grpc;
#[cfg(feature = "poem")]
pub mod json_yaml;
#[cfg(feature = "observability")]
pub mod metrics;
#[cfg(feature = "model")]
pub mod model;
#[cfg(any(feature = "model", feature = "base-model"))]
pub mod newtype;
#[cfg(feature = "redis")]
pub mod redis;
#[cfg(feature = "sql")]
pub mod repo;
#[cfg(feature = "model")]
pub mod retriable_error;
#[cfg(feature = "tokio")]
pub mod retries;
#[cfg(feature = "serialization")]
pub mod serialization;
#[cfg(feature = "observability")]
pub mod tracing;
pub mod virtual_exports;
pub mod testing;
#[cfg(test)]
test_r::enable!();
pub trait SafeDisplay {
fn to_safe_string(&self) -> String;
}
pub struct SafeString(String);
impl SafeDisplay for SafeString {
fn to_safe_string(&self) -> String {
self.0.clone()
}
}
impl Display for SafeString {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
write!(f, "{}", self.0)
}
}
pub fn safe(value: String) -> impl SafeDisplay {
SafeString(value)
}
pub fn widen_infallible<T>(_inf: Infallible) -> T {
panic!("impossible")
}