pub struct BoundingBox {
    pub srid: SRID,
    pub geom: Rect<f64>,
}
Expand description

An axis-aligned bounding rectangle.

MySQL doesn’t support native Rects. Corresponding functions like ST_Envelope() return a Polygon of the shape POLYGON((MINX MINY, MAXX MINY, MAXX MAXY, MINX MAXY, MINX MINY)) instead. This struct exists to provide more convenient access to the coordinates if your column always contains such polygons.

Warning: This can only be unserialized from a Polygon column. If polygons in other shapes are unserialized, the process may either fail or silently result in wrong bounds.

MySQL extension: The spatial reference system identifier (SRID) may identify the used coordinate system.

Fields

srid: SRIDgeom: Rect<f64>

Methods from Deref<Target = Rect<f64>>

Set the Rect’s minimum coordinate.

Panics

Panics if min’s x/y is greater than the maximum coordinate’s x/y.

Set the Rect’s maximum coordinate.

Panics

Panics if max’s x/y is less than the minimum coordinate’s x/y.

Trait Implementations

Converts this type into a mutable reference of the (usually inferred) input type.

Converts this type into a shared reference of the (usually inferred) input type.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

See the trait documentation.

See the trait documentation.

The number of fields that this type will consume. Must be equal to the number of times you would call row.take() in build_from_row Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

The Rust type you’d like to map from. Read more

Construct an instance of this type

See the trait documentation.

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.

Convert self to an expression for Diesel’s query builder. Read more

Convert &self to an expression for Diesel’s query builder. Read more

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.