pub enum Q {
Null,
Bool(bool),
Num(f64),
Str(QString),
Geom(G),
Instant(Bound),
Interval(Bound, Bound),
List(Vec<Q>),
}Expand description
A Resource queryable property possible concrete value
variants.
Variants§
Null
Unknown or undefined w/in the current context.
Bool(bool)
A known boolean value.
Num(f64)
A known numeric literal.
Str(QString)
Either a known UTF8 character string literal, or one that when used in comparisons, should be used ignoring its case and/or accent(s).
Geom(G)
A known geometry (spatial) instance.
Instant(Bound)
Either a known temporal instant or an unbounded value.
Interval(Bound, Bound)
A temporal interval.
List(Vec<Q>)
A list of other Queryables.
Implementations§
Source§impl Q
impl Q
Sourcepub fn new_plain_str(value: &str) -> Self
pub fn new_plain_str(value: &str) -> Self
Create a new instance as a plain literal string from given argument after trimming it.
Sourcepub fn try_from_timestamp_str(value: &str) -> Result<Self, MyError>
pub fn try_from_timestamp_str(value: &str) -> Result<Self, MyError>
Try creating a new temporal timestamp variant instance from a string of the form fullDate followed by “T”, followed by utcTime.
Sourcepub fn try_from_timestamp_ns(value: i128) -> Result<Self, MyError>
pub fn try_from_timestamp_ns(value: i128) -> Result<Self, MyError>
Try creating a new temporal timestamp variant instance from a number of nanoseconds since the Unix epoch.
Sourcepub fn try_from_timestamp(value: &Zoned) -> Result<Self, MyError>
pub fn try_from_timestamp(value: &Zoned) -> Result<Self, MyError>
Try creating a new temporal timestamp variant instance from a Zoned.
Sourcepub fn try_from_date_str(value: &str) -> Result<Self, MyError>
pub fn try_from_date_str(value: &str) -> Result<Self, MyError>
Try creating a new temporal date variant instance from a fullDate string.
IMPORTANT - CQL2 specs state that dates are to be considered as local wrt. time zones. This implementation however always assigns a UTC time zone.
Sourcepub fn try_from_date_ns(value: i128) -> Result<Self, MyError>
pub fn try_from_date_ns(value: i128) -> Result<Self, MyError>
Try creating a new temporal date variant instance from a number of nanoseconds since the Unix epoch.
Sourcepub fn try_from_date(value: &Date) -> Result<Self, MyError>
pub fn try_from_date(value: &Date) -> Result<Self, MyError>
Try creating a new temporal date variant instance from a civil Date.
Sourcepub fn try_from_wkt(value: &str) -> Result<Self, MyError>
pub fn try_from_wkt(value: &str) -> Result<Self, MyError>
Try creating a new instance from a Well Known Text encoded geometry.
Sourcepub fn try_from_wkb(value: &[u8]) -> Result<Self, MyError>
pub fn try_from_wkb(value: &[u8]) -> Result<Self, MyError>
Try creating a new instance from a GeoPackage Well Known Binary encoded geometry.
Sourcepub fn try_from_ewkb(value: &[u8]) -> Result<Self, MyError>
pub fn try_from_ewkb(value: &[u8]) -> Result<Self, MyError>
Try creating a new instance from a PostGIS Extended Well Known Binary encoded geometry.
Sourcepub fn to_bool(&self) -> Result<bool, MyError>
pub fn to_bool(&self) -> Result<bool, MyError>
Return the current value of this if it’s a boolean value.
Sourcepub fn to_str(&self) -> Result<QString, MyError>
pub fn to_str(&self) -> Result<QString, MyError>
Return the current value of this if it’s a string value.
Sourcepub fn to_num(&self) -> Result<f64, MyError>
pub fn to_num(&self) -> Result<f64, MyError>
Return the current value of this if it’s a number value.
Sourcepub fn to_geom(&self) -> Result<G, MyError>
pub fn to_geom(&self) -> Result<G, MyError>
Return the current value of this if it’s a Geometry value.
Sourcepub fn to_bound(&self) -> Result<Bound, MyError>
pub fn to_bound(&self) -> Result<Bound, MyError>
Return the current value of this if it’s a Bound value.
Trait Implementations§
Source§impl PartialOrd for Q
impl PartialOrd for Q
impl Eq for Q
Auto Trait Implementations§
impl Freeze for Q
impl RefUnwindSafe for Q
impl Send for Q
impl Sync for Q
impl Unpin for Q
impl UnwindSafe for 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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>
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>
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