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 moreAuto Trait Implementations§
impl<T> Freeze for RouteBundle<T>where
T: Freeze,
impl<T> RefUnwindSafe for RouteBundle<T>where
T: RefUnwindSafe,
impl<T> Send for RouteBundle<T>where
T: Send,
impl<T> Sync for RouteBundle<T>where
T: Sync,
impl<T> Unpin for RouteBundle<T>where
T: Unpin,
impl<T> UnwindSafe for RouteBundle<T>where
T: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)