Enum routing::legacy_router::RouteBundle
source · pub enum RouteBundle<T>{
Single(T),
Aggregate(Vec<T>),
}
Expand description
A bundle of one or more routing declarations to route together, that share the same target_name
Variants§
Single(T)
A single route from a unique source.
Aggregate(Vec<T>)
A bundle of routes representing an aggregated capability. This can be a vector of one, e.g. exposing a service from a collection.
Implementations§
source§impl<T> RouteBundle<T>
impl<T> RouteBundle<T>
pub fn map<U: Clone + Debug>(self, f: impl FnMut(T) -> U) -> RouteBundle<U>
sourcepub fn iter(&self) -> RouteBundleIter<'_, T> ⓘ
pub fn iter(&self) -> RouteBundleIter<'_, T> ⓘ
Returns an iterator over the values of OneOrMany<T>
.
sourcepub fn from_offer(input: T) -> Selfwhere
T: OfferDeclCommon + Clone,
pub fn from_offer(input: T) -> Selfwhere
T: OfferDeclCommon + Clone,
Creates a RouteBundle
from of a single offer routing declaration.
sourcepub fn from_offers(input: Vec<T>) -> Selfwhere
T: OfferDeclCommon + Clone,
pub fn from_offers(input: Vec<T>) -> Selfwhere
T: OfferDeclCommon + Clone,
Creates a RouteBundle
from of a list of offer routing declarations.
REQUIRES: input
is nonempty.
REQUIRES: All elements of input
share the same target_name
.
sourcepub fn from_expose(input: T) -> Selfwhere
T: ExposeDeclCommon + Clone,
pub fn from_expose(input: T) -> Selfwhere
T: ExposeDeclCommon + Clone,
Creates a RouteBundle
from of a single expose routing declaration.
sourcepub fn from_exposes(input: Vec<T>) -> Selfwhere
T: ExposeDeclCommon + Clone,
pub fn from_exposes(input: Vec<T>) -> Selfwhere
T: ExposeDeclCommon + Clone,
Creates a RouteBundle
from of a list of expose routing declarations.
REQUIRES: input
is nonempty.
REQUIRES: All elements of input
share the same target_name
.
source§impl<T> RouteBundle<T>where
T: ExposeDeclCommon + Clone,
impl<T> RouteBundle<T>where
T: ExposeDeclCommon + Clone,
pub fn availability(&self) -> &Availability
Trait Implementations§
source§impl<T> Clone for RouteBundle<T>
impl<T> Clone for RouteBundle<T>
source§fn clone(&self) -> RouteBundle<T>
fn clone(&self) -> RouteBundle<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more