Struct QueryBuilder
pub struct QueryBuilder<'q> {
client: &'q mut Client,
root: Option<&'q str>,
depth: Option<u32>,
include_values: bool,
}Available on crate feature
client only.Expand description
Query builder returned by Client::query.
Fields§
§client: &'q mut Client§root: Option<&'q str>§depth: Option<u32>§include_values: boolImplementations§
§impl<'q> QueryBuilder<'q>
impl<'q> QueryBuilder<'q>
pub const fn root(self, root: &'q str) -> Self
pub const fn root(self, root: &'q str) -> Self
Sets the root path for the query.
All paths in the result will be relative to this root.
pub const fn depth(self, depth: u32) -> Self
pub const fn depth(self, depth: u32) -> Self
Sets the maximum depth for the query.
Default is unlimited - which includes all child nodes.
pub const fn include_values(self, include: bool) -> Self
pub const fn include_values(self, include: bool) -> Self
Whether to include values in the query result.
Default is false.
pub async fn send(self) -> Result<Result<QueryResult<'q>, LelumError<'q>>>
pub async fn send(self) -> Result<Result<QueryResult<'q>, LelumError<'q>>>
Sends the query request and returns the result.
Auto Trait Implementations§
impl<'q> Freeze for QueryBuilder<'q>
impl<'q> RefUnwindSafe for QueryBuilder<'q>
impl<'q> Send for QueryBuilder<'q>
impl<'q> Sync for QueryBuilder<'q>
impl<'q> Unpin for QueryBuilder<'q>
impl<'q> !UnwindSafe for QueryBuilder<'q>
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