pub trait ResourceType: FromStr {
// Required method
fn resource_type() -> &'static str;
// Provided method
fn new(name: &str, package: Option<String>) -> Resource<Self> { ... }
}
Expand description
Trait implemented by types that can be used as resource.
Required Methods§
Sourcefn resource_type() -> &'static str
fn resource_type() -> &'static str
Returns string representation of the resource_type
.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.