pub trait RustConstructorResource {
// Required methods
fn name(&self) -> &str;
fn expose_type(&self) -> &str;
fn reg_render_resource(&self, render_list: &mut Vec<RenderResource>);
// Provided method
fn match_resource(&self, resource_name: &str, resource_type: &str) -> bool { ... }
}
Expand description
核心特征,用于统一管理Rust Constructor资源。
Required Methods§
Sourcefn expose_type(&self) -> &str
fn expose_type(&self) -> &str
返回资源类型。
Sourcefn reg_render_resource(&self, render_list: &mut Vec<RenderResource>)
fn reg_render_resource(&self, render_list: &mut Vec<RenderResource>)
注册资源。
Provided Methods§
Sourcefn match_resource(&self, resource_name: &str, resource_type: &str) -> bool
fn match_resource(&self, resource_name: &str, resource_type: &str) -> bool
匹配资源。