Skip to main content

CandidateKeyframe

Struct CandidateKeyframe 

Source
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: f64

Auto 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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.