Expand description
MACRO-13 · what a trait the activation macro emits leans on.
#[plexus_macros::activation(trait)] on impl FooActivation emits
trait Foo: every wire method as fn(&self, ..) -> BoxStream<'static, E>,
implemented by the activation and by FooClient<T>. A client call is a
stream of Result<ClientEvent<E>, ClientError>; a trait method is a
stream of E. This module is the bridge:
FromClientError— how a client failure becomes the event type’s own in-band error (one line, usuallyError { message }), so a caller ofdyn Foosees one shape whether it is talking to a local implementation or a remote one;owned_call— a'staticcall from an owned transport, since a trait method’s stream outlives the&selfit was called on;into_events/error_events— the mapping itself: a data event is yielded, a progress report is dropped, an error is yielded asE::from_client_error(err)and ends the stream.
Traits§
- From
Client Error - An event type that can carry a client failure in band.
Functions§
- error_
events - A trait method’s stream that yields
E::from_client_error(error)and ends — what an emitted client method returns when a parameter would not serialize. - into_
events - A typed client stream as a trait method’s stream: data events yielded,
progress dropped, the first error yielded as
E::from_client_error(err)and the stream ended there. - owned_
call Transport::callon a transport the stream owns, so the stream is'static: a trait method returns a stream that outlives the&selfit was called on, andTransport::callborrows its transport.
Type Aliases§
- BoxStream
- A boxed stream of
T— the return type of every method of a trait the activation macro emits.Sendoff wasm32, asItemStreamis; on wasm32 the browser’s futures are!Send, so the bound is dropped.