pub struct Pattern { /* private fields */ }Expand description
Pattern representation in the cognitive substrate
Implementations§
Source§impl Pattern
impl Pattern
pub fn new( embedding: Float32Array, metadata: Option<JsValue>, antecedents: Option<Vec<String>>, ) -> Result<Pattern, JsValue>
pub fn id(&self) -> Option<String>
pub fn embedding(&self) -> Float32Array
pub fn metadata(&self) -> Option<JsValue>
pub fn timestamp(&self) -> f64
pub fn antecedents(&self) -> Vec<String>
Trait Implementations§
Source§impl FromWasmAbi for Pattern
impl FromWasmAbi for Pattern
Source§impl IntoWasmAbi for Pattern
impl IntoWasmAbi for Pattern
Source§impl LongRefFromWasmAbi for Pattern
impl LongRefFromWasmAbi for Pattern
Source§impl OptionFromWasmAbi for Pattern
impl OptionFromWasmAbi for Pattern
Source§impl OptionIntoWasmAbi for Pattern
impl OptionIntoWasmAbi for Pattern
Source§impl RefFromWasmAbi for Pattern
impl RefFromWasmAbi for Pattern
Source§impl RefMutFromWasmAbi for Pattern
impl RefMutFromWasmAbi for Pattern
Source§impl TryFromJsValue for Pattern
impl TryFromJsValue for Pattern
Source§impl VectorFromWasmAbi for Pattern
impl VectorFromWasmAbi for Pattern
Source§impl VectorIntoWasmAbi for Pattern
impl VectorIntoWasmAbi for Pattern
impl SupportsConstructor for Pattern
impl SupportsInstanceProperty for Pattern
impl SupportsStaticProperty for Pattern
Auto Trait Implementations§
impl Freeze for Pattern
impl RefUnwindSafe for Pattern
impl Send for Pattern
impl Sync for Pattern
impl Unpin for Pattern
impl UnwindSafe for Pattern
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
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.