pub trait ServerPublisher {
// Required methods
fn publish_console(
&self,
subject: &str,
payload: &[u8],
) -> Result<(), ConsoleError>;
fn retire_console_channel(&self, subject: &str) -> Result<(), ConsoleError>;
}Expand description
The server’s own publish path for console records (SRV-012 R3: the publish with a server origin), and the roster removal of a tap channel whose last subscriber left (R6).
Required Methods§
Sourcefn publish_console(
&self,
subject: &str,
payload: &[u8],
) -> Result<(), ConsoleError>
fn publish_console( &self, subject: &str, payload: &[u8], ) -> Result<(), ConsoleError>
Publishes payload on subject as the server.
§Errors
Returns ConsoleError when the publish fails; the hub keeps the
record and offers it first on the next pump. The payload is borrowed
so that a failed record is still the hub’s to keep.
Sourcefn retire_console_channel(&self, subject: &str) -> Result<(), ConsoleError>
fn retire_console_channel(&self, subject: &str) -> Result<(), ConsoleError>
Removes the console.tap.<target> channel subject from the roster.
§Errors
Returns ConsoleError when the roster refuses.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".