Skip to main content

MarkerType

Trait MarkerType 

Source
pub trait MarkerType:
    Send
    + Sync
    + 'static {
    // Required method
    fn label() -> &'static str;
}
Expand description

Marker trait for sanitized value categories.

Implementing this trait on a zero-sized type lets you create domain-specific Sanitized<T> values.

§Example

use shell_sanitize::MarkerType;

struct DatabaseInput;
impl MarkerType for DatabaseInput {
    fn label() -> &'static str { "database_input" }
}

Required Methods§

Source

fn label() -> &'static str

Human-readable label for this marker category.

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.

Implementors§