pub enum QueryAnswer {
Ok(QueryType),
ConceptRowStream(Arc<ConceptRowHeader>, BoxStream<'static, Result<ConceptRow>>),
ConceptDocumentStream(Arc<ConceptDocumentHeader>, BoxStream<'static, Result<ConceptDocument>>),
}
Variants§
Ok(QueryType)
ConceptRowStream(Arc<ConceptRowHeader>, BoxStream<'static, Result<ConceptRow>>)
ConceptDocumentStream(Arc<ConceptDocumentHeader>, BoxStream<'static, Result<ConceptDocument>>)
Implementations§
Source§impl QueryAnswer
impl QueryAnswer
Sourcepub fn get_query_type(&self) -> QueryType
pub fn get_query_type(&self) -> QueryType
Retrieve the executed query’s type (shared by all elements in this stream).
§Examples
query_answer.get_query_type()
Sourcepub fn is_row_stream(&self) -> bool
pub fn is_row_stream(&self) -> bool
Sourcepub fn is_document_stream(&self) -> bool
pub fn is_document_stream(&self) -> bool
Sourcepub fn into_rows(self) -> BoxStream<'static, Result<ConceptRow>>
pub fn into_rows(self) -> BoxStream<'static, Result<ConceptRow>>
Unwraps the QueryAnswer
into a ConceptRowStream
.
Panics if it is not a ConceptRowStream
.
§Examples
query_answer.into_rows()
Sourcepub fn into_documents(self) -> BoxStream<'static, Result<ConceptDocument>>
pub fn into_documents(self) -> BoxStream<'static, Result<ConceptDocument>>
Unwraps the QueryAnswer
into a ConceptDocumentStream
.
Panics if it is not a ConceptDocumentStream
.
§Examples
query_answer.into_documents()
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QueryAnswer
impl !RefUnwindSafe for QueryAnswer
impl Send for QueryAnswer
impl !Sync for QueryAnswer
impl Unpin for QueryAnswer
impl !UnwindSafe for QueryAnswer
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request