INNER CODE UNIT · Rust
new
stalwartlabs/stalwart · crates/directory/src/lib.rs:46
pub fn new(directory_type: DirectoryType, error: impl Into<String>) -> Self {
Self {
directory_type,
error: error.into(),
}
}
pub fn directory_type(&self) -> DirectoryType {
self.directory_type
}
pub fn error(&self) -> trc::Error {
trc::StoreEvent::NotConfigured
.into_err()
.details("Directory is unavailable because it failed to initialize")
.reason(&self.error)
}
}