pub struct PipelineBuilder { /* private fields */ }Expand description
Fluent builder for PhysicsPipeline.
use oxiphysics_gpu::pipeline::{PipelineBuilder, PipelineStage};
let pipeline = PipelineBuilder::new()
.substeps(2)
.use_gpu(false)
.disable_stage(PipelineStage::PostProcess)
.build();
assert_eq!(pipeline.config.substeps, 2);
assert!(!pipeline.config.is_enabled(PipelineStage::PostProcess));Implementations§
Source§impl PipelineBuilder
impl PipelineBuilder
Sourcepub fn enable_stage(self, stage: PipelineStage) -> Self
pub fn enable_stage(self, stage: PipelineStage) -> Self
Add a stage to the enabled list (idempotent).
Sourcepub fn disable_stage(self, stage: PipelineStage) -> Self
pub fn disable_stage(self, stage: PipelineStage) -> Self
Remove a stage from the enabled list.
Sourcepub fn build(self) -> PhysicsPipeline
pub fn build(self) -> PhysicsPipeline
Consume the builder and produce a PhysicsPipeline.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PipelineBuilder
impl RefUnwindSafe for PipelineBuilder
impl Send for PipelineBuilder
impl Sync for PipelineBuilder
impl Unpin for PipelineBuilder
impl UnsafeUnpin for PipelineBuilder
impl UnwindSafe for PipelineBuilder
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more