Struct kvarn::extensions::Id

source ·
pub struct Id { /* private fields */ }
Expand description

A extension Id. The Self::priority is used for sorting extensions and Self::name for debugging which extensions are mounted.

Higher priority extensions are ran first. The debug name is useful when you want to see which priorities other extensions use. This is beneficial when creating “plug-and-play” extensions.

If two extensions with identical prioritys are inserted, the latter will override the prior. This only effects extensions of the same type.

Implementations§

source§

impl Id

source

pub fn new(priority: i32, name: &'static str) -> Self

Creates a new Id with priority and a name.

source

pub fn without_name(priority: i32) -> Self

Creates a Id withou