Trait skyline_web::traits::Combine
source · pub trait Combine {
type I: Content + Copy + Sized;
type J: Content + Copy + Sized;
type K: Content + Copy + Sized;
type Previous: ContentSequence;
fn combine<X>(self, other: &X) -> (Self::I, Self::J, Self::K, &X)
where
X: Content + ?Sized;
fn crawl_back(self) -> Self::Previous;
}Expand description
Helper trait used to rotate a queue of parent Contents. Think of this as of a
rotating buffer such that:
(A, B, C, D).combine(X) -> (B, C, D, X)This allows us to keep track of up to 3 parent contexts. The constraint is implemented
so that self-referencing Contents don’t blow up the stack on compilation.
Required Associated Types
sourcetype Previous: ContentSequence
type Previous: ContentSequence
Type when we crawl back one item
Required Methods
sourcefn combine<X>(self, other: &X) -> (Self::I, Self::J, Self::K, &X)where
X: Content + ?Sized,
fn combine<X>(self, other: &X) -> (Self::I, Self::J, Self::K, &X)where
X: Content + ?Sized,
Combines current tuple with a new element.
sourcefn crawl_back(self) -> Self::Previous
fn crawl_back(self) -> Self::Previous
Crawl back to the previous tuple