pub struct Creations<Item> { /* private fields */ }Expand description
One ordered creation batch.
The batch is the all-or-none unit for runtime route preparation. After routing succeeds, each child still settles independently in this declared order.
Implementations§
Source§impl<Item> Creations<Item>
impl<Item> Creations<Item>
pub fn one(item: Item) -> Self
Sourcepub fn into_one(self) -> Result<Item, Self>
pub fn into_one(self) -> Result<Item, Self>
Consume a batch containing exactly one item.
§Errors
Returns the complete ordered batch when it is empty or contains more than one item.
pub fn and(self, item: Item) -> Self
Sourcepub fn map<Mapped>(self, map: impl FnMut(Item) -> Mapped) -> Creations<Mapped>
pub fn map<Mapped>(self, map: impl FnMut(Item) -> Mapped) -> Creations<Mapped>
Transform every item while preserving declared order and cardinality.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn iter(&self) -> Iter<'_, Item>
Trait Implementations§
Source§impl<A, New> ActionItem for Creations<CreateChild<A, New>>
impl<A, New> ActionItem for Creations<CreateChild<A, New>>
type Custody = (Option<Creations<CreateChild<A, New>>>, Option<<Creations<CreateChild<A, New>> as ActionItem>::Reply>)
type Input<'a> = &'a mut Option<Creations<CreateChild<A, New>>> where Self: 'a
type Reply = ItemSettlement<Creations<CreateChild<A, New>>, <Creations<CreateChild<A, New>> as ActionItem>::Accepted, <Creations<CreateChild<A, New>> as ActionItem>::Rejection, <Creations<CreateChild<A, New>> as ActionItem>::Prerequisite>
type Accepted = Creations<RoutedCreation<A, New>>
type Rejection = ChildNamespaceExhausted
type Prerequisite = Never
fn prepare_interpretation( progress: &mut Option<InterpretationProgress<Self, Self::Custody, Self::Reply>>, )
fn interpretation_input<'a>(
custody: &'a mut Self::Custody,
) -> Option<(Self::Input<'a>, &'a mut Option<Self::Reply>)>where
Self: 'a,
fn finish_interpretation( progress: &mut Option<InterpretationProgress<Self, Self::Custody, Self::Reply>>, )
Source§impl<Item> ClassifySettlement for Creations<Item>where
Item: ClassifySettlement,
impl<Item> ClassifySettlement for Creations<Item>where
Item: ClassifySettlement,
Source§fn settlement_status(&self) -> SettlementStatus
fn settlement_status(&self) -> SettlementStatus
Inspect every member without consuming or rewriting the settlement.
Source§impl<Item> Extend<Item> for Creations<Item>
impl<Item> Extend<Item> for Creations<Item>
Source§fn extend<Items: IntoIterator<Item = Item>>(&mut self, items: Items)
fn extend<Items: IntoIterator<Item = Item>>(&mut self, items: Items)
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<Item> FromIterator<Item> for Creations<Item>
impl<Item> FromIterator<Item> for Creations<Item>
Source§fn from_iter<Items: IntoIterator<Item = Item>>(items: Items) -> Self
fn from_iter<Items: IntoIterator<Item = Item>>(items: Items) -> Self
Creates a value from an iterator. Read more
Source§impl<'a, Item> IntoIterator for &'a Creations<Item>
impl<'a, Item> IntoIterator for &'a Creations<Item>
Source§impl<Item> IntoIterator for Creations<Item>
impl<Item> IntoIterator for Creations<Item>
Source§impl<Host, RootEvent> SourceSettlementCustody<Host, RootEvent> for Creations<Never>
impl<Host, RootEvent> SourceSettlementCustody<Host, RootEvent> for Creations<Never>
type Custody = Creations<Never>
fn prepare_source(progress: &mut Option<SourceProgress<Self, Self::Custody>>)
fn offer_next_to_source( _: &mut Self::Custody, _: &mut Host, ) -> impl Future<Output = ()> + Send
fn finish_source(progress: &mut Option<SourceProgress<Self, Self::Custody>>)
impl<Item: Eq> Eq for Creations<Item>
impl<Item> StructuralPartialEq for Creations<Item>
Auto Trait Implementations§
impl<Item> Freeze for Creations<Item>
impl<Item> RefUnwindSafe for Creations<Item>where
Item: RefUnwindSafe,
impl<Item> Send for Creations<Item>where
Item: Send,
impl<Item> Sync for Creations<Item>where
Item: Sync,
impl<Item> Unpin for Creations<Item>where
Item: Unpin,
impl<Item> UnsafeUnpin for Creations<Item>
impl<Item> UnwindSafe for Creations<Item>where
Item: 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
Mutably borrows from an owned value. Read more