pub struct CandidateKeyframe<'a> {
pub features: &'a [Feature],
pub gray: Gray<'a>,
pub patches: &'a [Patch<'a>],
pub x: f64,
pub y: f64,
pub canonical_idx: u32,
pub dx: f64,
pub dy: f64,
}Expand description
One keyframe evaluate_candidates_audit/_refine/select_candidate score a query against — the parts of
keyframes.ts’s Keyframe (features/gray/patches/position) the Rust port needs. x/y is the keyframe’s
own native-pixel pose; canonical_idx/dx/dy is the caller’s canonical map already resolved and interned
per keyframe (a keyframe with no attachment resolves to its own canvas, dx = dy = 0) — select_candidate’s
rival check compares candidates by this resolved (canvas index, x, y), never by raw canvasId, exactly like
keyframes.ts’s position() closure did.
Fields§
§features: &'a [Feature]§gray: Gray<'a>§patches: &'a [Patch<'a>]§x: f64§y: f64§canonical_idx: u32§dx: f64§dy: f64Auto Trait Implementations§
impl<'a> Freeze for CandidateKeyframe<'a>
impl<'a> RefUnwindSafe for CandidateKeyframe<'a>
impl<'a> Send for CandidateKeyframe<'a>
impl<'a> Sync for CandidateKeyframe<'a>
impl<'a> Unpin for CandidateKeyframe<'a>
impl<'a> UnsafeUnpin for CandidateKeyframe<'a>
impl<'a> UnwindSafe for CandidateKeyframe<'a>
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