pub struct Feature<'a> { /* private fields */ }
Expand description
OGR Feature
Implementations
sourceimpl<'a> Feature<'a>
impl<'a> Feature<'a>
pub fn new(defn: &'a Defn) -> Result<Feature<'_>>
pub unsafe fn _with_c_feature(
defn: &'a Defn,
c_feature: OGRFeatureH
) -> Feature<'_>
pub fn _lazy_feature_geometries(defn: &'a Defn) -> Vec<Geometry>
sourcepub fn field(&self, name: &str) -> Result<FieldValue>
pub fn field(&self, name: &str) -> Result<FieldValue>
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 None
.
pub fn geometry_by_name(&self, field_name: &str) -> Result<&Geometry>
pub fn geometry_by_index(&self, idx: usize) -> Result<&Geometry>
pub fn create(&self, lyr: &Layer) -> Result<()>
pub fn set_field_string(&self, field_name: &str, value: &str) -> Result<()>
pub fn set_field_double(&self, field_name: &str, value: f64) -> Result<()>
pub fn set_field_integer(&self, field_name: &str, value: i32) -> Result<()>
pub fn set_field(&self, field_name: &str, value: &FieldValue) -> Result<()>
pub fn set_geometry(&mut self, geom: Geometry) -> Result<()>
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Feature<'a>
impl<'a> !Send for Feature<'a>
impl<'a> !Sync for Feature<'a>
impl<'a> Unpin for Feature<'a>
impl<'a> UnwindSafe for Feature<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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