Trait modelator::artifact::ArtifactCreator [−][src]
pub trait ArtifactCreator where
Self: Sized, {
fn from_string(s: &str) -> Result<Self, Error>;
fn try_read_from_file<P: AsRef<Path>>(path: P) -> Result<Self, Error> { ... }
}
Expand description
A sister trait for Artifacts for static constructor methods NOTE: static methods and polymorphic methods prevent trait-object instantiation so this approach allows dynamic use of Artifacts
Required methods
fn from_string(s: &str) -> Result<Self, Error>
fn from_string(s: &str) -> Result<Self, Error>
Create a new instance from a file content string.