pub struct ScopedLayer<L> { /* private fields */ }Expand description
Transparent wrapper around a layer (identity Layer::build).
Trait Implementations§
Source§impl<L> Layer for ScopedLayer<L>where
L: Layer,
impl<L> Layer for ScopedLayer<L>where
L: Layer,
Auto Trait Implementations§
impl<L> Freeze for ScopedLayer<L>where
L: Freeze,
impl<L> RefUnwindSafe for ScopedLayer<L>where
L: RefUnwindSafe,
impl<L> Send for ScopedLayer<L>where
L: Send,
impl<L> Sync for ScopedLayer<L>where
L: Sync,
impl<L> Unpin for ScopedLayer<L>where
L: Unpin,
impl<L> UnsafeUnpin for ScopedLayer<L>where
L: UnsafeUnpin,
impl<L> UnwindSafe for ScopedLayer<L>where
L: UnwindSafe,
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
Source§impl<T> LayerExt for Twhere
T: Layer,
impl<T> LayerExt for Twhere
T: Layer,
Source§fn map<O2, F>(self, f: F) -> MapLayer<Self, F>
fn map<O2, F>(self, f: F) -> MapLayer<Self, F>
Maps successful output with
f after Layer::build.Source§fn map_error<E2, F>(self, f: F) -> MapErrorLayer<Self, F>
fn map_error<E2, F>(self, f: F) -> MapErrorLayer<Self, F>
Maps the error channel with
f after Layer::build.Source§fn merge<L2>(self, that: L2) -> MergeLayer<Self, L2>
fn merge<L2>(self, that: L2) -> MergeLayer<Self, L2>
Runs
self and that and returns both outputs as a pair (fails on first error).Source§fn provide<L0>(self, that: L0) -> ProvideLayer<Self, L0>
fn provide<L0>(self, that: L0) -> ProvideLayer<Self, L0>
Runs
that for side effects, discards its output, then runs self.Source§fn provide_merge<L0>(self, that: L0) -> ProvideMergeLayer<Self, L0>
fn provide_merge<L0>(self, that: L0) -> ProvideMergeLayer<Self, L0>
Runs
that then self, returning (self_output, provider_output).Source§fn scoped(self) -> ScopedLayer<Self>
fn scoped(self) -> ScopedLayer<Self>
Marker wrapper;
Layer::build delegates to the inner layer (for future scope/resource hooks).Source§fn launch(self) -> Effect<(), Self::Error, ()>
fn launch(self) -> Effect<(), Self::Error, ()>
Turns this layer into an
Effect that runs Layer::build and discards the output.Source§fn pipe<O2, F>(self, f: F) -> O2where
F: FnOnce(Self) -> O2,
fn pipe<O2, F>(self, f: F) -> O2where
F: FnOnce(Self) -> O2,
Feed
self into a combinator (implemented with crate::foundation::func::pipe1).