pub struct LayerStack { /* private fields */ }Expand description
A stack of middleware layers
Implementations§
Source§impl LayerStack
impl LayerStack
Sourcepub fn push(&mut self, layer: Box<dyn MiddlewareLayer>)
pub fn push(&mut self, layer: Box<dyn MiddlewareLayer>)
Add a middleware layer to the stack
Layers are executed in the order they are added (outermost first).
Sourcepub fn prepend(&mut self, layer: Box<dyn MiddlewareLayer>)
pub fn prepend(&mut self, layer: Box<dyn MiddlewareLayer>)
Add a middleware layer to the beginning of the stack
This layer will be executed first (outermost).
Trait Implementations§
Source§impl Clone for LayerStack
impl Clone for LayerStack
Source§fn clone(&self) -> LayerStack
fn clone(&self) -> LayerStack
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for LayerStack
impl Default for LayerStack
Source§fn default() -> LayerStack
fn default() -> LayerStack
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LayerStack
impl !RefUnwindSafe for LayerStack
impl Send for LayerStack
impl Sync for LayerStack
impl Unpin for LayerStack
impl !UnwindSafe for LayerStack
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