Skip to main content

Labeled

Trait Labeled 

Source
pub trait Labeled: ResourceType {
    // Required method
    fn label(&self) -> &str;

    // Provided method
    fn error_ident(&self) -> ResourceErrorIdent { ... }
}

Required Methods§

Source

fn label(&self) -> &str

Returns a string identifying this resource for logging and errors.

It may be a user-provided string or it may be a placeholder from wgpu.

It is non-empty unless the user-provided string was empty.

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§