Struct gdal::vector::Feature

source ·
pub struct Feature<'a> { /* private fields */ }
Expand description

OGR Feature

Implementations

Creates a new Feature by wrapping a C pointer and a Defn

Safety

This method operates on a raw C pointer

Returns the C wrapped pointer

Safety

This method returns a raw C pointer

Returns the feature identifier, or None if none has been assigned.

Get the value of a named field. If the field exists, it returns a FieldValue wrapper, that you need to unpack to a base type (string, float, etc).

If the field is missing, returns GdalError::InvalidFieldName.

If the field has an unsupported type, returns a GdalError::UnhandledFieldType.

If the field is null, returns None.

Get the value of the specified field as a i32.

If the field is missing, returns GdalError::InvalidFieldIndex.

Returns Ok(None) if the field is null. Returns Ok(Some(0)) on other kinds of errors.

Get the value of the specified field as a i32.

If the field is missing, returns GdalError::InvalidFieldName.

Returns Ok(None) if the field is null. Returns Ok(Some(0)) on other kinds of errors.

Get the value of the specified field as a i64.

If the field is missing, returns GdalError::InvalidFieldName.

Returns Ok(None) if the field is null. Returns Ok(Some(0)) on other kinds of errors.

Get the value of the specified field as a i64.

If the field is missing, returns GdalError::InvalidFieldIndex.

Returns Ok(None) if the field is null. Returns Ok(Some(0)) on other kinds of errors.

Get the value of the specified field as a f64.

If the field is missing, returns GdalError::InvalidFieldName.

Returns Ok(None) if the field is null. Returns Ok(Some(0.)) on other kinds of errors.

Get the value of the specified field as a f64.

If the field is missing, returns GdalError::InvalidFieldIndex.

Returns Ok(None) if the field is null. Returns Ok(Some(0.)) on other kinds of errors.

Get the value of the specified field as a String.

If the field is missing, returns GdalError::InvalidFieldName.

Returns Ok(None) if the field is null.

Get the value of the specified field as a String.

If the field is missing, returns GdalError::InvalidFieldIndex.

Returns Ok(None) if the field is null.

Get the value of the specified field as a DateTime<FixedOffset>.

If the field is missing, returns GdalError::InvalidFieldName.

Returns Ok(None) if the field is null.

Get the value of the specified field as a DateTime<FixedOffset>.

If the field is missing, returns GdalError::InvalidFieldIndex.

Returns Ok(None) if the field is null.

Get the field’s geometry.

Trait Implementations

Formats the value using the given formatter. Read more
Executes the destructor for this 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.

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.