pub trait Publisher: Clone {
type Error: Error;
// Required method
fn publish_with<P>(
&self,
publishable: P,
options: PublishOptions,
) -> impl Future<Output = Result<(), Self::Error>> + Send
where P: Publishable + Send + 'static;
// Provided method
fn publish<P>(
&self,
publishable: P,
) -> impl Future<Output = Result<(), Self::Error>> + Send
where P: Publishable + Send + 'static { ... }
}Expand description
Types which may publish publishable data.
Required Associated Types§
Required Methods§
Sourcefn publish_with<P>(
&self,
publishable: P,
options: PublishOptions,
) -> impl Future<Output = Result<(), Self::Error>> + Sendwhere
P: Publishable + Send + 'static,
fn publish_with<P>(
&self,
publishable: P,
options: PublishOptions,
) -> impl Future<Output = Result<(), Self::Error>> + Sendwhere
P: Publishable + Send + 'static,
Publish the publishable structure with PublishOptions overriding all
other options, including the Publishable::publish_overrides(). If no
options are provided, fallback options shall be used.
Provided Methods§
Sourcefn publish<P>(
&self,
publishable: P,
) -> impl Future<Output = Result<(), Self::Error>> + Sendwhere
P: Publishable + Send + 'static,
fn publish<P>(
&self,
publishable: P,
) -> impl Future<Output = Result<(), Self::Error>> + Sendwhere
P: Publishable + Send + 'static,
Publish the publishable structure without overriding PublishOptions.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.