Skip to main content

RouterBuilderShardExt

Trait RouterBuilderShardExt 

Source
pub trait RouterBuilderShardExt {
    // Required methods
    fn shard(self, shard: impl Into<ErasedShard>) -> Self;
    fn discover_shards(self) -> Self;
}
Available on crate feature runtime only.
Expand description

Registers shards on a RouterBuilder.

Required Methods§

Source

fn shard(self, shard: impl Into<ErasedShard>) -> Self

Mounts a shard route.

Source

fn discover_shards(self) -> Self

Available on crate feature discover only.

Registers every shard linked into the binary.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§