Struct InProcessBackplane
pub struct InProcessBackplane { /* private fields */ }Implementations§
§impl InProcessBackplane
impl InProcessBackplane
pub fn new() -> InProcessBackplane
Trait Implementations§
§impl Default for InProcessBackplane
impl Default for InProcessBackplane
§fn default() -> InProcessBackplane
fn default() -> InProcessBackplane
Returns the “default value” for a type. Read more
§impl SubscriptionBackplane for InProcessBackplane
impl SubscriptionBackplane for InProcessBackplane
§fn publish<'a>(
&'a self,
channel: &'a str,
payload: &'a str,
) -> Pin<Box<dyn Future<Output = Result<(), CratestackError>> + Send + 'a>>
fn publish<'a>( &'a self, channel: &'a str, payload: &'a str, ) -> Pin<Box<dyn Future<Output = Result<(), CratestackError>> + Send + 'a>>
Publishes
payload on channel, fire and forget.§fn subscribe<'a>(
&'a self,
channel: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = BackplaneMessage> + Send>>, CratestackError>> + Send + 'a>>
fn subscribe<'a>( &'a self, channel: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = BackplaneMessage> + Send>>, CratestackError>> + Send + 'a>>
Receives everything published on
channel from now on. The future
resolves only once the subscription is live, so a caller that then
tells its client “ready” has not missed anything published after.§fn publishes_model_events_in_tx(&self) -> bool
fn publishes_model_events_in_tx(&self) -> bool
Whether model events reach this backplane from inside the writing
transaction (Postgres
NOTIFY, delivered at commit). When false, the
runtime publishes each model event after commit, from its outbox drain,
and a topic’s publish_in_tx is refused.Auto Trait Implementations§
impl !Freeze for InProcessBackplane
impl RefUnwindSafe for InProcessBackplane
impl Send for InProcessBackplane
impl Sync for InProcessBackplane
impl Unpin for InProcessBackplane
impl UnsafeUnpin for InProcessBackplane
impl UnwindSafe for InProcessBackplane
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
§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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more