pub struct PipeLineBuilder<'pl, E, C> where
    C: 'static, 
{ /* private fields */ }
Expand description

Serve as an medium to create an instance of PipeLine

This type can be used to construct an instance or PipeLine through a builder-like pattern.

Implementations

Create an instance of PipeLine

Examples
let pipeline = PipeLineBuilder::new();
assert!(pipeline.entity_ref().is_none());

Consume it and return an instance of PipeLine

Examples
async fn process_entity(_: &mut Vec<E>, _: &mut App<E>) {}
let pipeline = PipeLineBuilder::new();
    .entity(process_entity)
    .build("marker");

set the extensions of PipeLineBuilder

Examples
let pipeline = Pipeline::builder()
    .extensions(1i32)
    .build("marker");
assert_eq!(pipeline.extensions().get::<i32>(), 1);

get extensions of PipeLineBuilder

Examples
let pipeline = Pipeline::builder()
    .extensions(1i32)
    .build("marker");
assert_eq!(pipeline.extensions_ref().get::<i32>(), 1);

set the rank of PipeLineBuilder

Examples
let pipeline = Pipeline::builder()
    .rank(1)
    .build("marker");
assert_eq!(pipeline.rank(), 1);

get rank of PipeLineBuilder

Examples
async fn process_entity(&mut Vec<E>, &mut App<E>) {}
let pipeline = Pipeline::builder()
    .rank(1)
    .build("marker");
assert_eq!(pipeline.rank_ref(), 1);

Set the initializer of PipeLine, if not called, the default value is None

Examples
async fn initializer(_: &mut App<E>) {}
let pipeline = PipeLines::builder()
    .initializer(&initializer)
    .build("marker".into());
assert! (pipeline.initializer.is_some())

Get the shared reference of initializer of PipeLine, if not set before, None is returned

Examples
async fn initializer(_: &mut App<E>) {}
let pipeline = PipeLines::builder()
    .initializer(&initializer)
    .build("marker".into());
assert_eq! (pipeline.initializer_ref (), Some(initializer))

Set the disposer of PipeLine, if not called, the default value is None

Examples
async fn disposer(_: &mut App<E>) {}
let pipeline = PipeLines::builder()
    .disposer(&disposer)
    .build("marker".into());
assert! (pipeline.disposer.is_some())

Get the shared reference of disposer of PipeLine, if not set before, None is returned

Examples
async fn disposer(_: &mut App<E>) {}
let pipeline = PipeLines::builder()
    .disposer(&disposer)
    .build("marker".into());
assert_eq! (pipeline.disposer_ref (), Some(disposer))

Set the process_entity of PipeLine, if not called, the default value is None

Examples
async fn process_entity(_ : & mut Vec < E >,_: &mut App<E>) {}
let pipeline = PipeLines::builder()
    .entity(&process_entity)
    .build("marker".into());
assert! (pipeline.process_entity.is_some())

Get the shared reference of process_entity of PipeLine, if not set before, None is returned

Examples
async fn process_entity(_ : & mut Vec < E >,_: &mut App<E>) {}
let pipeline = PipeLines::builder()
    .entity(&process_entity)
    .build("marker".into());
assert_eq! (pipeline.entity_ref (), Some(process_entity))

Set the process_yerr of PipeLine, if not called, the default value is None

Examples
async fn process_yerr(_ : & mut Vec < Result<Response, MetaResponse> >,_: &mut App<E>) {}
let pipeline = PipeLines::builder()
    .yerr(&process_yerr)
    .build("marker".into());
assert! (pipeline.process_yerr.is_some())

Get the shared reference of process_yerr of PipeLine, if not set before, None is returned

Examples
async fn process_yerr(_ : & mut Vec < Result<Response, MetaResponse> >,_: &mut App<E>) {}
let pipeline = PipeLines::builder()
    .yerr(&process_yerr)
    .build("marker".into());
assert_eq! (pipeline.yerr_ref (), Some(process_yerr))

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more