GeomaterialsQuery

Struct GeomaterialsQuery 

Source
pub struct GeomaterialsQuery {
Show 43 fields pub name: Option<String>, pub q: Option<String>, pub ima: Option<bool>, pub ima_status: Option<Vec<ImaStatus>>, pub ima_notes: Option<Vec<ImaNotes>>, pub entrytype: Option<Vec<u8>>, pub elements_inc: Option<String>, pub elements_exc: Option<String>, pub crystal_system: Option<Vec<CrystalSystem>>, pub cleavagetype: Option<Vec<CleavageType>>, pub fracturetype: Option<Vec<FractureType>>, pub lustretype: Option<Vec<LustreType>>, pub diapheny: Option<Vec<Diapheny>>, pub tenacity: Option<Vec<Tenacity>>, pub colour: Option<String>, pub streak: Option<String>, pub opticaltype: Option<OpticalType>, pub opticalsign: Option<OpticalSign>, pub hardness_min: Option<f32>, pub hardness_max: Option<f32>, pub density_min: Option<f64>, pub density_max: Option<f64>, pub ri_min: Option<f32>, pub ri_max: Option<f32>, pub bi_min: Option<String>, pub bi_max: Option<String>, pub optical2v_min: Option<String>, pub optical2v_max: Option<String>, pub varietyof: Option<i32>, pub synid: Option<i32>, pub polytypeof: Option<i32>, pub groupid: Option<i32>, pub id_in: Option<Vec<i32>>, pub non_utf: Option<bool>, pub meteoritical_code: Option<String>, pub meteoritical_code_exists: Option<bool>, pub updated_at: Option<String>, pub fields: Option<String>, pub omit: Option<String>, pub expand: Option<Vec<String>>, pub ordering: Option<GeomaterialsOrdering>, pub page: Option<i32>, pub page_size: Option<i32>,
}
Expand description

Builder for geomaterial query parameters.

Fields§

§name: Option<String>

Name filter (supports wildcards * and _).

§q: Option<String>

Search query.

§ima: Option<bool>

IMA approved only.

§ima_status: Option<Vec<ImaStatus>>

IMA status filter.

§ima_notes: Option<Vec<ImaNotes>>

IMA notes filter.

§entrytype: Option<Vec<u8>>

Entry types filter.

§elements_inc: Option<String>

Include elements (comma-separated).

§elements_exc: Option<String>

Exclude elements (comma-separated).

§crystal_system: Option<Vec<CrystalSystem>>

Crystal system filter.

§cleavagetype: Option<Vec<CleavageType>>

Cleavage type filter.

§fracturetype: Option<Vec<FractureType>>

Fracture type filter.

§lustretype: Option<Vec<LustreType>>

Lustre type filter.

§diapheny: Option<Vec<Diapheny>>

Diapheny (transparency) filter.

§tenacity: Option<Vec<Tenacity>>

Tenacity filter.

§colour: Option<String>

Colour filter.

§streak: Option<String>

Streak filter.

§opticaltype: Option<OpticalType>

Optical type filter.

§opticalsign: Option<OpticalSign>

Optical sign filter.

§hardness_min: Option<f32>

Hardness minimum (Mohs).

§hardness_max: Option<f32>

Hardness maximum (Mohs).

§density_min: Option<f64>

Density minimum.

§density_max: Option<f64>

Density maximum.

§ri_min: Option<f32>

Refractive index minimum.

§ri_max: Option<f32>

Refractive index maximum.

§bi_min: Option<String>

Birefringence minimum.

§bi_max: Option<String>

Birefringence maximum.

§optical2v_min: Option<String>

2V minimum.

§optical2v_max: Option<String>

2V maximum.

§varietyof: Option<i32>

Variety of (geomaterial ID).

§synid: Option<i32>

Synonym of (geomaterial ID).

§polytypeof: Option<i32>

Polytype of (geomaterial ID).

§groupid: Option<i32>

Group ID.

§id_in: Option<Vec<i32>>

Filter by IDs.

§non_utf: Option<bool>

Include non-UTF names.

§meteoritical_code: Option<String>

Meteoritical code filter.

§meteoritical_code_exists: Option<bool>

Meteoritical code exists.

§updated_at: Option<String>

Updated after datetime.

§fields: Option<String>

Fields to include.

§omit: Option<String>

Fields to omit.

§expand: Option<Vec<String>>

Fields to expand.

§ordering: Option<GeomaterialsOrdering>

Ordering.

§page: Option<i32>

Page number.

§page_size: Option<i32>

Page size.

Implementations§

Source§

impl GeomaterialsQuery

Source

pub fn new() -> Self

Create a new empty query.

Source

pub fn name(self, name: impl Into<String>) -> Self

Filter by name (supports * and _ wildcards).

Source

pub fn search(self, q: impl Into<String>) -> Self

Search query.

Source

pub fn ima_approved(self, approved: bool) -> Self

Filter to IMA-approved minerals only.

Source

pub fn entry_types(self, types: Vec<u8>) -> Self

Filter by entry type.

Source

pub fn with_elements(self, elements: impl Into<String>) -> Self

Filter by included elements.

Source

pub fn without_elements(self, elements: impl Into<String>) -> Self

Filter by excluded elements.

Source

pub fn crystal_systems(self, systems: Vec<CrystalSystem>) -> Self

Filter by crystal system.

Source

pub fn hardness_range(self, min: f32, max: f32) -> Self

Filter by hardness range.

Source

pub fn density_range(self, min: f64, max: f64) -> Self

Filter by density range.

Source

pub fn select_fields(self, fields: impl Into<String>) -> Self

Select specific fields.

Source

pub fn omit_fields(self, fields: impl Into<String>) -> Self

Omit specific fields.

Source

pub fn expand_fields(self, fields: Vec<String>) -> Self

Expand related fields.

Source

pub fn order_by(self, ordering: GeomaterialsOrdering) -> Self

Set ordering.

Source

pub fn page(self, page: i32) -> Self

Set page number.

Source

pub fn page_size(self, size: i32) -> Self

Set page size.

Trait Implementations§

Source§

impl Clone for GeomaterialsQuery

Source§

fn clone(&self) -> GeomaterialsQuery

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 GeomaterialsQuery

Source§

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

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

impl Default for GeomaterialsQuery

Source§

fn default() -> GeomaterialsQuery

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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<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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
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, 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<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