pub struct HyperedgeStream { /* private fields */ }Expand description
Streaming hyperedge result iterator
Implementations§
Source§impl HyperedgeStream
impl HyperedgeStream
pub fn into_reference( val: HyperedgeStream, env: Env, ) -> Result<Reference<HyperedgeStream>>
pub fn into_instance(self, env: Env) -> Result<ClassInstance<HyperedgeStream>>
Source§impl HyperedgeStream
impl HyperedgeStream
Sourcepub fn new(results: Vec<JsHyperedgeResult>) -> Self
pub fn new(results: Vec<JsHyperedgeResult>) -> Self
Create a new hyperedge stream
Source§impl HyperedgeStream
impl HyperedgeStream
Sourcepub fn next(&mut self) -> Result<Option<JsHyperedgeResult>>
pub fn next(&mut self) -> Result<Option<JsHyperedgeResult>>
Get the next hyperedge result
§Example
const stream = await db.searchHyperedgesStream(query);
for await (const result of stream) {
console.log(result);
}Sourcepub fn collect(&mut self) -> Vec<JsHyperedgeResult>
pub fn collect(&mut self) -> Vec<JsHyperedgeResult>
Collect all remaining results
Trait Implementations§
Source§impl FromNapiMutRef for HyperedgeStream
impl FromNapiMutRef for HyperedgeStream
Source§unsafe fn from_napi_mut_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static mut Self>
unsafe fn from_napi_mut_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static mut Self>
Safety Read more
Source§impl FromNapiRef for HyperedgeStream
impl FromNapiRef for HyperedgeStream
Source§unsafe fn from_napi_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static Self>
unsafe fn from_napi_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static Self>
Safety Read more
Source§impl FromNapiValue for &HyperedgeStream
impl FromNapiValue for &HyperedgeStream
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl FromNapiValue for &mut HyperedgeStream
impl FromNapiValue for &mut HyperedgeStream
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl ObjectFinalize for HyperedgeStream
impl ObjectFinalize for HyperedgeStream
Source§impl ToNapiValue for HyperedgeStream
impl ToNapiValue for HyperedgeStream
Source§unsafe fn to_napi_value(
env: napi_env,
val: HyperedgeStream,
) -> Result<napi_value>
unsafe fn to_napi_value( env: napi_env, val: HyperedgeStream, ) -> Result<napi_value>
Safety Read more
Source§impl TypeName for &HyperedgeStream
impl TypeName for &HyperedgeStream
Source§impl TypeName for &mut HyperedgeStream
impl TypeName for &mut HyperedgeStream
Source§impl TypeName for HyperedgeStream
impl TypeName for HyperedgeStream
Source§impl ValidateNapiValue for &HyperedgeStream
impl ValidateNapiValue for &HyperedgeStream
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for &mut HyperedgeStream
impl ValidateNapiValue for &mut HyperedgeStream
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Auto Trait Implementations§
impl Freeze for HyperedgeStream
impl RefUnwindSafe for HyperedgeStream
impl Send for HyperedgeStream
impl Sync for HyperedgeStream
impl Unpin for HyperedgeStream
impl UnwindSafe for HyperedgeStream
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> 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