pub enum ExecutionPreference {
Cpu,
}Expand description
Operator-facing preference for ORT execution provider. Resolved at construction time inside the fastembed embedder constructors.
The accelerator variants are #[cfg]-gated behind their respective Cargo
features so a binary built --no-default-features --features fastembed
(CPU-only) compiles cleanly — the variants don’t exist if the underlying
ORT EP isn’t linked in.
All accelerator variants are best-effort: if the provider can’t
initialize at session-build time (CUDA toolkit absent, CoreML framework
unavailable, runtime version mismatch), the construction code falls back
to CPU and emits a single tracing::warn per construction. No panics; no
Result surface change.
Variants§
Cpu
CPU-only — the default. with_execution_providers is not called.
Trait Implementations§
Source§impl Clone for ExecutionPreference
impl Clone for ExecutionPreference
Source§fn clone(&self) -> ExecutionPreference
fn clone(&self) -> ExecutionPreference
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExecutionPreference
impl Debug for ExecutionPreference
Source§impl Default for ExecutionPreference
impl Default for ExecutionPreference
Source§fn default() -> ExecutionPreference
fn default() -> ExecutionPreference
Returns the “default value” for a type. Read more
Source§impl PartialEq for ExecutionPreference
impl PartialEq for ExecutionPreference
Source§fn eq(&self, other: &ExecutionPreference) -> bool
fn eq(&self, other: &ExecutionPreference) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ExecutionPreference
impl StructuralPartialEq for ExecutionPreference
Auto Trait Implementations§
impl Freeze for ExecutionPreference
impl RefUnwindSafe for ExecutionPreference
impl Send for ExecutionPreference
impl Sync for ExecutionPreference
impl Unpin for ExecutionPreference
impl UnsafeUnpin for ExecutionPreference
impl UnwindSafe for ExecutionPreference
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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