Struct diesel_mysql_spatial::data_types::MultiLineString
source · [−]pub struct MultiLineString {
pub srid: SRID,
pub geom: MultiLineString<f64>,
}Expand description
A collection of LineStrings.
MySQL extension: The spatial reference system identifier (SRID) may identify the used coordinate system.
Fields
srid: SRIDgeom: MultiLineString<f64>Methods from Deref<Target = MultiLineString<f64>>
sourcepub fn is_closed(&self) -> bool
pub fn is_closed(&self) -> bool
True if the MultiLineString is empty or if all of its LineStrings are closed - see
LineString::is_closed.
Examples
use geo_types::{MultiLineString, LineString, line_string};
let open_line_string: LineString<f32> = line_string![(x: 0., y: 0.), (x: 5., y: 0.)];
assert!(!MultiLineString::new(vec![open_line_string.clone()]).is_closed());
let closed_line_string: LineString<f32> = line_string![(x: 0., y: 0.), (x: 5., y: 0.), (x: 0., y: 0.)];
assert!(MultiLineString::new(vec![closed_line_string.clone()]).is_closed());
// MultiLineString is not closed if *any* of it's LineStrings are not closed
assert!(!MultiLineString::new(vec![open_line_string, closed_line_string]).is_closed());
// An empty MultiLineString is closed
assert!(MultiLineString::<f32>::new(vec![]).is_closed());pub fn iter(&self) -> impl Iterator<Item = &LineString<T>>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut LineString<T>>
Trait Implementations
sourceimpl AsMut<MultiLineString<f64>> for MultiLineString
impl AsMut<MultiLineString<f64>> for MultiLineString
sourcefn as_mut(&mut self) -> &mut MultiLineString<f64>
fn as_mut(&mut self) -> &mut MultiLineString<f64>
Converts this type into a mutable reference of the (usually inferred) input type.
sourceimpl AsRef<MultiLineString<f64>> for MultiLineString
impl AsRef<MultiLineString<f64>> for MultiLineString
sourcefn as_ref(&self) -> &MultiLineString<f64>
fn as_ref(&self) -> &MultiLineString<f64>
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl Clone for MultiLineString
impl Clone for MultiLineString
sourcefn clone(&self) -> MultiLineString
fn clone(&self) -> MultiLineString
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for MultiLineString
impl Debug for MultiLineString
sourceimpl Deref for MultiLineString
impl Deref for MultiLineString
sourceimpl DerefMut for MultiLineString
impl DerefMut for MultiLineString
sourceimpl From<MultiLineString<f64>> for MultiLineString
impl From<MultiLineString<f64>> for MultiLineString
sourcefn from(geom: MultiLineString<f64>) -> Self
fn from(geom: MultiLineString<f64>) -> Self
Converts to this type from the input type.
sourceimpl From<MultiLineString> for Geometry
impl From<MultiLineString> for Geometry
sourcefn from(other: MultiLineString) -> Self
fn from(other: MultiLineString) -> Self
Converts to this type from the input type.
sourceimpl FromSql<MultiLineString, Mysql> for MultiLineString
impl FromSql<MultiLineString, Mysql> for MultiLineString
sourceimpl<__ST, __DB> FromSqlRow<__ST, __DB> for MultiLineString where
__DB: Backend,
Self: FromSql<__ST, __DB>,
impl<__ST, __DB> FromSqlRow<__ST, __DB> for MultiLineString where
__DB: Backend,
Self: FromSql<__ST, __DB>,
sourcefn build_from_row<R: Row<__DB>>(row: &mut R) -> Result<Self>
fn build_from_row<R: Row<__DB>>(row: &mut R) -> Result<Self>
See the trait documentation.
sourceconst FIELDS_NEEDED: usize = 1usize
const FIELDS_NEEDED: usize = 1usize
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
sourceimpl PartialEq<MultiLineString> for MultiLineString
impl PartialEq<MultiLineString> for MultiLineString
sourcefn eq(&self, other: &MultiLineString) -> bool
fn eq(&self, other: &MultiLineString) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &MultiLineString) -> bool
fn ne(&self, other: &MultiLineString) -> bool
This method tests for !=.
sourceimpl<__ST, __DB> Queryable<__ST, __DB> for MultiLineString where
__DB: Backend,
Self: FromSql<__ST, __DB>,
impl<__ST, __DB> Queryable<__ST, __DB> for MultiLineString where
__DB: Backend,
Self: FromSql<__ST, __DB>,
sourceimpl ToSql<Geometry, Mysql> for MultiLineString
impl ToSql<Geometry, Mysql> for MultiLineString
sourceimpl ToSql<MultiLineString, Mysql> for MultiLineString
impl ToSql<MultiLineString, Mysql> for MultiLineString
sourceimpl TryFrom<Geometry> for MultiLineString
impl TryFrom<Geometry> for MultiLineString
impl StructuralPartialEq for MultiLineString
Auto Trait Implementations
impl RefUnwindSafe for MultiLineString
impl Send for MultiLineString
impl Sync for MultiLineString
impl Unpin for MultiLineString
impl UnwindSafe for MultiLineString
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> IntoSql for T
impl<T> IntoSql for T
sourcefn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
Convert self to an expression for Diesel’s query builder. Read more
sourcefn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
Convert &self to an expression for Diesel’s query builder. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more