Trait

Trait Trait 

Source
pub trait Trait:
    Any
    + Send
    + Sync
    + Debug {
    // Required methods
    fn trait_id(&self) -> &ShapeId;
    fn as_any(&self) -> &dyn Any;
}
Expand description

Trait representing a Smithy trait at runtime.

Traits provide additional metadata about shapes that affect serialization, validation, and other behaviors.

Required Methods§

Source

fn trait_id(&self) -> &ShapeId

Returns the Shape ID of this trait.

Source

fn as_any(&self) -> &dyn Any

Returns this trait as &dyn Any for downcasting.

Implementors§