pub struct Publisher<T, P>{ /* private fields */ }Expand description
Publisher implemented over a selected-wire zero-copy transport.
Implementations§
Source§impl<T, P> Publisher<T, P>
impl<T, P> Publisher<T, P>
Sourcepub async fn publish_stable<Payload>(
&self,
resource_id: u16,
call_options: CallOptions,
init: impl for<'payload> FnOnce(&'payload mut Payload) + Send,
) -> Result<(), PubSubError>where
T::Wire: UWirePayload<Payload>,
<T::Wire as UWirePayload<Payload>>::Codec: LoanPayload<Payload> + Send + Sync,
pub async fn publish_stable<Payload>(
&self,
resource_id: u16,
call_options: CallOptions,
init: impl for<'payload> FnOnce(&'payload mut Payload) + Send,
) -> Result<(), PubSubError>where
T::Wire: UWirePayload<Payload>,
<T::Wire as UWirePayload<Payload>>::Codec: LoanPayload<Payload> + Send + Sync,
Publishes an initialized stable payload using the transport endpoint’s selected wire.
Source§impl<T, P> Publisher<T, P>
impl<T, P> Publisher<T, P>
Sourcepub async fn publish_uninit_stable<Payload>(
&self,
resource_id: u16,
call_options: CallOptions,
init: impl for<'payload> FnOnce(StablePayloadInitContext<'payload, Payload>) -> Result<InitializedStablePayload<'payload, Payload>, UWireError> + Send,
) -> Result<(), PubSubError>where
T::Wire: UWirePayload<Payload, Codec = StableContainerPayload<Payload>>,
Payload: StablePayloadInit + Send,
pub async fn publish_uninit_stable<Payload>(
&self,
resource_id: u16,
call_options: CallOptions,
init: impl for<'payload> FnOnce(StablePayloadInitContext<'payload, Payload>) -> Result<InitializedStablePayload<'payload, Payload>, UWireError> + Send,
) -> Result<(), PubSubError>where
T::Wire: UWirePayload<Payload, Codec = StableContainerPayload<Payload>>,
Payload: StablePayloadInit + Send,
Publishes a stable payload by initializing it directly in uninitialized transport storage.
Trait Implementations§
Auto Trait Implementations§
impl<T, P> Freeze for Publisher<T, P>
impl<T, P> RefUnwindSafe for Publisher<T, P>
impl<T, P> Send for Publisher<T, P>
impl<T, P> Sync for Publisher<T, P>
impl<T, P> Unpin for Publisher<T, P>
impl<T, P> UnwindSafe for Publisher<T, P>
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<TCore> UWithNativePrefixWire for TCore
impl<TCore> UWithNativePrefixWire for TCore
Source§fn into_native_prefix_wire_transport<W>(
self,
wire: W,
) -> UWireTransport<TCore, W, NativePrefixFrameMetadataCodec>where
W: UWire,
fn into_native_prefix_wire_transport<W>(
self,
wire: W,
) -> UWireTransport<TCore, W, NativePrefixFrameMetadataCodec>where
W: UWire,
Wraps this core with an external or custom selected wire using canonical metadata.
Source§fn into_protobuf_transport(
self,
) -> UWireTransport<TCore, ProtobufWire, NativePrefixFrameMetadataCodec>
fn into_protobuf_transport( self, ) -> UWireTransport<TCore, ProtobufWire, NativePrefixFrameMetadataCodec>
Wraps this core with the Protocol Buffers selected-wire profile.
Source§fn into_stable_container_transport(
self,
) -> UWireTransport<TCore, StableContainerWireFormat, NativePrefixFrameMetadataCodec>
fn into_stable_container_transport( self, ) -> UWireTransport<TCore, StableContainerWireFormat, NativePrefixFrameMetadataCodec>
Wraps this core with the stable-container selected-wire profile.