Preview of the proposed up-rust native-frame-model branch (up-rust b6b99c6d, up-spec f0e9b17) — not released documentation. branch · write-up

Struct Publisher

Source
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>

Source

pub fn new(transport: Arc<T>, uri_provider: Arc<P>) -> Self

Creates a publisher over a zero-copy transport.

Source§

impl<T, P> Publisher<T, P>

Source

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>

Source

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§

Source§

impl<T, P> Debug for Publisher<T, P>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T, P> Freeze for Publisher<T, P>
where T: ?Sized, P: ?Sized,

§

impl<T, P> RefUnwindSafe for Publisher<T, P>

§

impl<T, P> Send for Publisher<T, P>
where T: ?Sized, P: ?Sized,

§

impl<T, P> Sync for Publisher<T, P>
where T: ?Sized, P: ?Sized,

§

impl<T, P> Unpin for Publisher<T, P>
where T: ?Sized, P: ?Sized,

§

impl<T, P> UnwindSafe for Publisher<T, P>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Any for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

§

fn type_name(&self) -> &'static str

§

impl<T> AnySync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<TCore> UWithNativePrefixWire for TCore

Source§

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>

Wraps this core with the Protocol Buffers selected-wire profile.
Source§

fn into_stable_container_transport( self, ) -> UWireTransport<TCore, StableContainerWireFormat, NativePrefixFrameMetadataCodec>

Wraps this core with the stable-container selected-wire profile.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more