Skip to main content

Q

Enum Q 

Source
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

Source

pub fn new_plain_str(value: &str) -> Self

Create a new instance as a plain literal string from given argument after trimming it.

Source

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.

Source

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.

Source

pub fn try_from_timestamp(value: &Zoned) -> Result<Self, MyError>

Try creating a new temporal timestamp variant instance from a Zoned.

Source

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.

Source

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.

Source

pub fn try_from_date(value: &Date) -> Result<Self, MyError>

Try creating a new temporal date variant instance from a civil Date.

Source

pub fn try_from_wkt(value: &str) -> Result<Self, MyError>

Try creating a new instance from a Well Known Text encoded geometry.

Source

pub fn try_from_wkb(value: &[u8]) -> Result<Self, MyError>

Try creating a new instance from a GeoPackage Well Known Binary encoded geometry.

Source

pub fn try_from_ewkb(value: &[u8]) -> Result<Self, MyError>

Try creating a new instance from a PostGIS Extended Well Known Binary encoded geometry.

Source

pub fn to_bool(&self) -> Result<bool, MyError>

Return the current value of this if it’s a boolean value.

Source

pub fn to_str(&self) -> Result<QString, MyError>

Return the current value of this if it’s a string value.

Source

pub fn to_num(&self) -> Result<f64, MyError>

Return the current value of this if it’s a number value.

Source

pub fn to_geom(&self) -> Result<G, MyError>

Return the current value of this if it’s a Geometry value.

Source

pub fn to_bound(&self) -> Result<Bound, MyError>

Return the current value of this if it’s a Bound value.

Source

pub fn to_interval(&self) -> Result<(Bound, Bound), MyError>

Return the current value of this if it’s a Interval value as a pair of Bounds.

Source

pub fn to_list(&self) -> Result<Vec<Q>, MyError>

Return the current value of this if it’s a collection.

Trait Implementations§

Source§

impl Clone for Q

Source§

fn clone(&self) -> Q

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Q

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Q

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Bound> for Q

Source§

fn from(value: Bound) -> Self

Converts to this type from the input type.
Source§

impl From<Timestamp> for Q

Source§

fn from(value: Timestamp) -> Self

Converts to this type from the input type.
Source§

impl From<bool> for Q

Source§

fn from(value: bool) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for Q

Source§

fn from(value: f64) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Q

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Q

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl TryFrom<&Q> for Bound

Source§

type Error = MyError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &Q) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Date> for Q

Source§

type Error = MyError

The type returned in the event of a conversion error.
Source§

fn try_from(value: Date) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Q> for Bound

Source§

type Error = MyError

The type returned in the event of a conversion error.
Source§

fn try_from(value: Q) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<i128> for Q

Source§

type Error = MyError

The type returned in the event of a conversion error.
Source§

fn try_from(value: i128) -> Result<Self, MyError>

Performs the conversion.
Source§

impl TryFrom<i16> for Q

Source§

type Error = MyError

The type returned in the event of a conversion error.
Source§

fn try_from(value: i16) -> Result<Self, MyError>

Performs the conversion.
Source§

impl TryFrom<i32> for Q

Source§

type Error = MyError

The type returned in the event of a conversion error.
Source§

fn try_from(value: i32) -> Result<Self, MyError>

Performs the conversion.
Source§

impl TryFrom<i64> for Q

Source§

type Error = MyError

The type returned in the event of a conversion error.
Source§

fn try_from(value: i64) -> Result<Self, MyError>

Performs the conversion.
Source§

impl TryFrom<i8> for Q

Source§

type Error = MyError

The type returned in the event of a conversion error.
Source§

fn try_from(value: i8) -> Result<Self, MyError>

Performs the conversion.
Source§

impl TryFrom<isize> for Q

Source§

type Error = MyError

The type returned in the event of a conversion error.
Source§

fn try_from(value: isize) -> Result<Self, MyError>

Performs the conversion.
Source§

impl TryFrom<u128> for Q

Source§

type Error = MyError

The type returned in the event of a conversion error.
Source§

fn try_from(value: u128) -> Result<Self, MyError>

Performs the conversion.
Source§

impl TryFrom<u16> for Q

Source§

type Error = MyError

The type returned in the event of a conversion error.
Source§

fn try_from(value: u16) -> Result<Self, MyError>

Performs the conversion.
Source§

impl TryFrom<u32> for Q

Source§

type Error = MyError

The type returned in the event of a conversion error.
Source§

fn try_from(value: u32) -> Result<Self, MyError>

Performs the conversion.
Source§

impl TryFrom<u64> for Q

Source§

type Error = MyError

The type returned in the event of a conversion error.
Source§

fn try_from(value: u64) -> Result<Self, MyError>

Performs the conversion.
Source§

impl TryFrom<u8> for Q

Source§

type Error = MyError

The type returned in the event of a conversion error.
Source§

fn try_from(value: u8) -> Result<Self, MyError>

Performs the conversion.
Source§

impl TryFrom<usize> for Q

Source§

type Error = MyError

The type returned in the event of a conversion error.
Source§

fn try_from(value: usize) -> Result<Self, MyError>

Performs the conversion.
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more