Skip to main content

Query

Struct Query 

Source
pub struct Query {
Show 17 fields pub name: String, pub from: Option<String>, pub to: Option<String>, pub as_of: Option<String>, pub entry: Option<usize>, pub event: Option<usize>, pub asset: Option<String>, pub schedule: Option<String>, pub party: Option<String>, pub project: Option<String>, pub basis: Option<String>, pub payee: Option<String>, pub after: Option<usize>, pub code: Option<String>, pub new_name: Option<String>, pub category: Option<String>, pub account: Option<AccountSpec>,
}
Expand description

The question an expectation asks: everything but the answer.

Fields§

§name: String

The query’s name.

§from: Option<String>

A period’s first day (raw, YYYY-MM-DD).

§to: Option<String>

A period’s last day.

§as_of: Option<String>

An as-of query’s day.

§entry: Option<usize>

The event whose entry is asked about.

§event: Option<usize>

The event a run query asks about.

§asset: Option<String>

The asset asked about.

§schedule: Option<String>

The schedule asked about.

§party: Option<String>

The party asked about.

§project: Option<String>

The project asked about.

§basis: Option<String>

party_totals’ basis.

§payee: Option<String>

The payee asked about.

§after: Option<usize>

The books after event N (the runner has already applied them).

§code: Option<String>

The account a command names.

§new_name: Option<String>

The new name a rename command gives.

§category: Option<String>

The category a set-tax-category command sets.

§account: Option<AccountSpec>

The account an add-account command adds.

Implementations§

Source§

impl Query

Source

pub fn is_command(&self) -> bool

True when it is a command, tried on a copy of the books.

Source

pub fn is_format(&self) -> bool

True when it is a formats appendix’s query.

Source

pub fn is_complete(&self) -> bool

True when the example must list every value the query covers.

Trait Implementations§

Source§

impl Clone for Query

Source§

fn clone(&self) -> Query

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Query

Source§

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

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

impl PartialEq for Query

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Query

Auto Trait Implementations§

§

impl Freeze for Query

§

impl RefUnwindSafe for Query

§

impl Send for Query

§

impl Sync for Query

§

impl Unpin for Query

§

impl UnsafeUnpin for Query

§

impl UnwindSafe for Query

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, 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> 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.