pub struct LocalPublisher { /* private fields */ }Expand description
In-memory publisher backed by a ManifestRegistry.
Implementations§
Source§impl LocalPublisher
impl LocalPublisher
pub fn new( server_version: impl Into<String>, default_endpoint: Endpoint, ) -> Self
pub fn registry(&self) -> &ManifestRegistry
pub fn registry_mut(&mut self) -> &mut ManifestRegistry
Sourcepub fn default_endpoint(&self) -> &Endpoint
pub fn default_endpoint(&self) -> &Endpoint
Default endpoint advertised on successful subscriptions. The
negotiated transport’s tag is paired with this endpoint’s
address to form the SubscribeAck::endpoint.
pub fn register( &mut self, descriptor: FeedDescriptor, ) -> Result<(), ValidationError>
Sourcepub fn handle_subscribe(
&self,
req: &SubscriptionDescriptor,
) -> SubscribeResponse
pub fn handle_subscribe( &self, req: &SubscriptionDescriptor, ) -> SubscribeResponse
Validate a subscription request and produce the matching
SubscribeResponse. Unknown feeds and capability violations
produce Err variants with descriptive codes; successful
negotiations produce an Ack pointing at the publisher’s
default endpoint with the negotiated transport.
Trait Implementations§
Source§impl Clone for LocalPublisher
impl Clone for LocalPublisher
Source§fn clone(&self) -> LocalPublisher
fn clone(&self) -> LocalPublisher
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LocalPublisher
impl RefUnwindSafe for LocalPublisher
impl Send for LocalPublisher
impl Sync for LocalPublisher
impl Unpin for LocalPublisher
impl UnsafeUnpin for LocalPublisher
impl UnwindSafe for LocalPublisher
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more