Skip to main content

RouterBuilderShardExt

Trait RouterBuilderShardExt 

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

Registers shards on a RouterBuilder.

Required Methods§

Source

fn shard(self, shard: impl Shard) -> 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".

Implementations on Foreign Types§

Source§

impl RouterBuilderShardExt for RouterBuilder

Source§

fn shard(self, shard: impl Shard) -> Self

Source§

fn discover_shards(self) -> Self

Available on crate feature discover only.

Implementors§