pub struct PointcloudReconstructionRegistry { /* private fields */ }Expand description
Ordered executable providers for pointcloud reconstruction.
Fallback happens only for Unsupported or Unavailable. A refusal is
not a fallback trigger: when a provider says the data cannot support the
request, that is an answer about the data, and asking a second provider
the same question would only find one willing to guess.
Implementations§
Source§impl PointcloudReconstructionRegistry
impl PointcloudReconstructionRegistry
Sourcepub fn register<B>(&mut self, priority: i32, provider: B)where
B: PointcloudReconstruction + 'static,
pub fn register<B>(&mut self, priority: i32, provider: B)where
B: PointcloudReconstruction + 'static,
Register an implementation. Higher priorities run first.
Sourcepub fn register_conformant<B>(
&mut self,
priority: i32,
provider: B,
) -> Result<(), Box<ConformanceReport>>where
B: PointcloudReconstruction + 'static,
pub fn register_conformant<B>(
&mut self,
priority: i32,
provider: B,
) -> Result<(), Box<ConformanceReport>>where
B: PointcloudReconstruction + 'static,
Register only if the provider passes the shared conformance suite.
Conformance is a precondition of registration rather than a test someone might remember to run: a provider that violates the contract is rejected here, with the failing report, instead of being discovered later by a caller receiving an unexplained empty mesh.
§Errors
Returns the report when the provider violates any obligation.
Sourcepub fn register_arc(
&mut self,
priority: i32,
provider: Arc<dyn PointcloudReconstruction>,
)
pub fn register_arc( &mut self, priority: i32, provider: Arc<dyn PointcloudReconstruction>, )
Register a shared trait object.
Sourcepub fn providers(&self) -> impl Iterator<Item = &dyn PointcloudReconstruction>
pub fn providers(&self) -> impl Iterator<Item = &dyn PointcloudReconstruction>
Registered providers in dispatch order.
Sourcepub fn reconstruct(
&self,
cloud: &PointCloud,
request: &ReconstructionRequest,
options: &ExecutionOptions,
) -> GeomResult<Reconstruction>
pub fn reconstruct( &self, cloud: &PointCloud, request: &ReconstructionRequest, options: &ExecutionOptions, ) -> GeomResult<Reconstruction>
Reconstruct through the first provider able to take the work.
§Errors
Returns Unsupported when no registered provider can run at all, and
BudgetExceeded when every candidate was excluded by the caller’s
memory bound.
Trait Implementations§
Source§impl Clone for PointcloudReconstructionRegistry
impl Clone for PointcloudReconstructionRegistry
Source§fn clone(&self) -> PointcloudReconstructionRegistry
fn clone(&self) -> PointcloudReconstructionRegistry
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for PointcloudReconstructionRegistry
impl Default for PointcloudReconstructionRegistry
Source§fn default() -> PointcloudReconstructionRegistry
fn default() -> PointcloudReconstructionRegistry
Auto Trait Implementations§
impl Freeze for PointcloudReconstructionRegistry
impl !RefUnwindSafe for PointcloudReconstructionRegistry
impl Send for PointcloudReconstructionRegistry
impl Sync for PointcloudReconstructionRegistry
impl Unpin for PointcloudReconstructionRegistry
impl !UnwindSafe for PointcloudReconstructionRegistry
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§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>
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>
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