pub struct FullQuery {
pub query: String,
pub args: BTreeMap<Arc<str>, TransparentValue>,
}
Expand description
A full Trustfall query, with both query and arguments to be used
Fields§
§query: String
§args: BTreeMap<Arc<str>, TransparentValue>
Implementations§
Source§impl FullQuery
impl FullQuery
Sourcepub fn from_path(path: &Path) -> Result<FullQuery, Box<dyn Error>>
pub fn from_path(path: &Path) -> Result<FullQuery, Box<dyn Error>>
Extracts a query from a file
§Errors
Will return an error variant if
- The path cannot be read for some reason, or
- The file has a supported file extension, but failed to deserialize, or
- The file is of an unsupported file extension, or
- The file is of an unknown file extension
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FullQuery
impl<'de> Deserialize<'de> for FullQuery
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FullQuery
impl RefUnwindSafe for FullQuery
impl Send for FullQuery
impl Sync for FullQuery
impl Unpin for FullQuery
impl UnwindSafe for FullQuery
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 more