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§

source

fn resource_type() -> &'static str

Returns string representation of the resource_type.

Provided Methods§

source

fn new(name: &str, package: Option<String>) -> Resource<Self>

Creates new instance of Resource.

Implementors§