pub trait DescribeServer: Broker {
// Required method
fn describe_server(&self) -> ServerSpec;
}Expand description
A broker that describes itself as an AsyncAPI server.
Broker crates implement this so their connection coordinates land in the generated AsyncAPI
document and the broker carries a stable identity when registered with
with_broker_labeled; it can also be wired on
manually with RustStream::server. A broker without a
network address (the in-memory broker) describes itself with
ServerSpec::in_process, so it still gets a label / identity for multi-broker routing.
§Examples
use ruststream::{Broker, DescribeServer, ServerSpec};
fn describe<B: DescribeServer>(broker: &B) -> ServerSpec {
broker.describe_server()
}Required Methods§
Sourcefn describe_server(&self) -> ServerSpec
fn describe_server(&self) -> ServerSpec
Returns the server coordinates for this broker.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".