Struct gdal::vector::Feature [−][src]
pub struct Feature<'a> { /* fields omitted */ }
OGR Feature
Implementations
impl<'a> Feature<'a>
[src]
impl<'a> Feature<'a>
[src]pub fn new(defn: &'a Defn) -> Result<Feature<'_>>
[src]
pub unsafe fn from_c_feature(
defn: &'a Defn,
c_feature: OGRFeatureH
) -> Feature<'_>
[src]
defn: &'a Defn,
c_feature: OGRFeatureH
) -> Feature<'_>
Creates a new Feature by wrapping a C pointer and a Defn
Safety
This method operates on a raw C pointer
pub fn _lazy_feature_geometries(defn: &'a Defn) -> Vec<Geometry>
[src]
pub fn fid(&self) -> Option<u64>
[src]
Returns the feature identifier, or None
if none has been assigned.
pub fn field<S: AsRef<str>>(&self, name: S) -> Result<Option<FieldValue>>
[src]
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
.
pub fn geometry(&self) -> &Geometry
[src]
Get the field’s geometry.
pub fn geometry_by_name(&self, field_name: &str) -> Result<&Geometry>
[src]
pub fn geometry_by_index(&self, idx: usize) -> Result<&Geometry>
[src]
pub fn create(&self, lyr: &Layer<'_>) -> Result<()>
[src]
pub fn set_field_string(&self, field_name: &str, value: &str) -> Result<()>
[src]
pub fn set_field_double(&self, field_name: &str, value: f64) -> Result<()>
[src]
pub fn set_field_integer(&self, field_name: &str, value: i32) -> Result<()>
[src]
pub fn set_field_integer64(&self, field_name: &str, value: i64) -> Result<()>
[src]
pub fn set_field(&self, field_name: &str, value: &FieldValue) -> Result<()>
[src]
pub fn set_geometry(&mut self, geom: Geometry) -> Result<()>
[src]
pub fn field_count(&self) -> i32
[src]
pub fn fields(&self) -> FieldValueIterator<'_>ⓘNotable traits for FieldValueIterator<'a>
impl<'a> Iterator for FieldValueIterator<'a> type Item = (String, Option<FieldValue>);
[src]
Notable traits for FieldValueIterator<'a>
impl<'a> Iterator for FieldValueIterator<'a> type Item = (String, Option<FieldValue>);
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Feature<'a>
impl<'a> !RefUnwindSafe for Feature<'a>
impl<'a> UnwindSafe for Feature<'a>
impl<'a> UnwindSafe for Feature<'a>