pub struct Route { /* private fields */ }Expand description
A Route defines a message flow: from a source endpoint, through a composed Tower Service pipeline.
Implementations§
Source§impl Route
impl Route
Sourcepub fn new(from_uri: impl Into<String>, pipeline: BoxProcessor) -> Self
pub fn new(from_uri: impl Into<String>, pipeline: BoxProcessor) -> Self
Create a new route from the given source URI and processor pipeline.
Sourcepub fn into_pipeline(self) -> BoxProcessor
pub fn into_pipeline(self) -> BoxProcessor
Consume the route and return its pipeline.
Sourcepub fn with_concurrency(self, model: ConcurrencyModel) -> Self
pub fn with_concurrency(self, model: ConcurrencyModel) -> Self
Set a concurrency model override for this route.
Sourcepub fn concurrency_override(&self) -> Option<&ConcurrencyModel>
pub fn concurrency_override(&self) -> Option<&ConcurrencyModel>
Get the concurrency model override, if any.
Sourcepub fn into_parts(self) -> (BoxProcessor, Option<ConcurrencyModel>)
pub fn into_parts(self) -> (BoxProcessor, Option<ConcurrencyModel>)
Consume the route, returning the pipeline and optional concurrency override.
Auto Trait Implementations§
impl Freeze for Route
impl !RefUnwindSafe for Route
impl Send for Route
impl !Sync for Route
impl Unpin for Route
impl UnsafeUnpin for Route
impl !UnwindSafe for Route
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