pub struct BrowserCameraTracker { /* private fields */ }Expand description
Explicit CPU byte-copy adapter for the bounded camera-flow demo.
Implementations§
Source§impl BrowserCameraTracker
impl BrowserCameraTracker
Sourcepub fn new(width: usize, height: usize) -> Result<BrowserCameraTracker, JsValue>
pub fn new(width: usize, height: usize) -> Result<BrowserCameraTracker, JsValue>
Creates a 64..=320 pixel-per-axis frame tracker.
Sourcepub fn track_gray_copy(
&mut self,
gray: &Uint8Array,
person_mask: &Uint8Array,
timestamp_ms: f64,
) -> Result<String, JsValue>
pub fn track_gray_copy( &mut self, gray: &Uint8Array, person_mask: &Uint8Array, timestamp_ms: f64, ) -> Result<String, JsValue>
Checks lengths, explicitly copies JS gray/mask bytes, and returns a bounded report.
Trait Implementations§
Source§impl From<BrowserCameraTracker> for JsValue
impl From<BrowserCameraTracker> for JsValue
Source§fn from(value: BrowserCameraTracker) -> Self
fn from(value: BrowserCameraTracker) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for BrowserCameraTracker
impl FromWasmAbi for BrowserCameraTracker
Source§impl IntoWasmAbi for BrowserCameraTracker
impl IntoWasmAbi for BrowserCameraTracker
Source§impl LongRefFromWasmAbi for BrowserCameraTracker
impl LongRefFromWasmAbi for BrowserCameraTracker
Source§type Abi = WasmPtr<WasmRefCell<BrowserCameraTracker>>
type Abi = WasmPtr<WasmRefCell<BrowserCameraTracker>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRef<BrowserCameraTracker>
type Anchor = RcRef<BrowserCameraTracker>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiSource§impl RefFromWasmAbi for BrowserCameraTracker
impl RefFromWasmAbi for BrowserCameraTracker
Source§type Abi = WasmPtr<WasmRefCell<BrowserCameraTracker>>
type Abi = WasmPtr<WasmRefCell<BrowserCameraTracker>>
The Wasm ABI type references to
Self are recovered from.Source§type Anchor = RcRef<BrowserCameraTracker>
type Anchor = RcRef<BrowserCameraTracker>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for BrowserCameraTracker
impl RefMutFromWasmAbi for BrowserCameraTracker
Source§type Abi = WasmPtr<WasmRefCell<BrowserCameraTracker>>
type Abi = WasmPtr<WasmRefCell<BrowserCameraTracker>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRefMut<BrowserCameraTracker>
type Anchor = RcRefMut<BrowserCameraTracker>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiimpl SupportsConstructor for BrowserCameraTracker
impl SupportsInstanceProperty for BrowserCameraTracker
impl SupportsStaticProperty for BrowserCameraTracker
Source§impl VectorFromWasmAbi for BrowserCameraTracker
impl VectorFromWasmAbi for BrowserCameraTracker
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[BrowserCameraTracker]>
Source§impl VectorIntoWasmAbi for BrowserCameraTracker
impl VectorIntoWasmAbi for BrowserCameraTracker
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[BrowserCameraTracker]>) -> Self::Abi
Source§impl WasmDescribeVector for BrowserCameraTracker
impl WasmDescribeVector for BrowserCameraTracker
Auto Trait Implementations§
impl Freeze for BrowserCameraTracker
impl RefUnwindSafe for BrowserCameraTracker
impl Send for BrowserCameraTracker
impl Sync for BrowserCameraTracker
impl Unpin for BrowserCameraTracker
impl UnsafeUnpin for BrowserCameraTracker
impl UnwindSafe for BrowserCameraTracker
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.