pub struct LayerStack { /* private fields */ }Expand description
A stack of middleware layers
Implementations§
Source§impl LayerStack
impl LayerStack
Sourcepub fn new() -> LayerStack
pub fn new() -> LayerStack
Create a new empty layer stack
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
Source§impl Extend<Box<dyn MiddlewareLayer>> for LayerStack
impl Extend<Box<dyn MiddlewareLayer>> for LayerStack
Source§fn extend<T>(&mut self, iter: T)
fn extend<T>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl IntoIterator for LayerStack
impl IntoIterator for LayerStack
Source§type Item = Box<dyn MiddlewareLayer>
type Item = Box<dyn MiddlewareLayer>
The type of the elements being iterated over.
Source§type IntoIter = IntoIter<<LayerStack as IntoIterator>::Item>
type IntoIter = IntoIter<<LayerStack as IntoIterator>::Item>
Which kind of iterator are we turning this into?
Source§fn into_iter(self) -> <LayerStack as IntoIterator>::IntoIter
fn into_iter(self) -> <LayerStack as IntoIterator>::IntoIter
Creates an iterator from a value. 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