pub struct Options {
    pub timeout: Option<Duration>,
    pub offset: u32,
    pub limit: Option<u32>,
}
Expand description

Most Conn methods allows to pass an options argument

Some options are applicable only to some methods (will be ignored otherwise).

Which can be:

Fields

timeout: Option<Duration>

For example, a method whose options argument is {timeout: Some(Duration::from_secs_f32(1.5)}) will stop after 1.5 seconds on the local node, although this does not guarantee that execution will stop on the remote server node.

offset: u32

The offset option specifies the number of rows to skip before starting to return rows from the query.

Can be used with select() method. Default: 0

limit: Option<u32>

The limit option specifies the number of rows to return after the offset option has been processed.

Can be used with select() method. Treats as unlimited if None specified. Default: None

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self

The resulting type after obtaining ownership.

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

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.