pub struct Geoname {
pub geoname_id: i64,
pub name: String,
pub latitude: f64,
pub longitude: f64,
pub country_code: String,
pub admin1_code: String,
pub population: u64,
}
Expand description
A single geographic place.
This corresponds to a single row in the main “geoname” table described in the GeoNames documentation 1. We exclude fields we don’t need.
Fields§
§geoname_id: i64
The geonameid
straight from the geoname table.
name: String
This is pretty much the place’s canonical name. Usually there will be a
row in the alternates table with the same name, but not always. When
there is such a row, it doesn’t always have is_preferred_name
set, and
in fact fact there may be another row with a different name with
is_preferred_name
set.
latitude: f64
Latitude in decimal degrees.
longitude: f64
Longitude in decimal degrees.
country_code: String
ISO-3166 two-letter uppercase country code, e.g., “US”.
admin1_code: String
The top-level administrative region for the place within its country, like a state or province. For the U.S., the two-letter uppercase state abbreviation.
population: u64
Population size.
Implementations§
Trait Implementations§
source§impl<UT> ConvertError<UT> for Geoname
impl<UT> ConvertError<UT> for Geoname
fn try_convert_unexpected_callback_error( e: UnexpectedUniFFICallbackError, ) -> Result<Self>
source§impl<UT> FfiConverter<UT> for Geoname
impl<UT> FfiConverter<UT> for Geoname
source§const TYPE_ID_META: MetadataBuffer = _
const TYPE_ID_META: MetadataBuffer = _
source§type FfiType = RustBuffer
type FfiType = RustBuffer
source§fn lower(v: Self) -> RustBuffer
fn lower(v: Self) -> RustBuffer
source§fn try_lift(buf: RustBuffer) -> Result<Self>
fn try_lift(buf: RustBuffer) -> Result<Self>
source§impl<UT> LiftReturn<UT> for Geoname
impl<UT> LiftReturn<UT> for Geoname
source§type ReturnType = <Geoname as Lift<UT>>::FfiType
type ReturnType = <Geoname as Lift<UT>>::FfiType
source§fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
§fn lift_foreign_return(
ffi_return: Self::ReturnType,
call_status: RustCallStatus,
) -> Self
fn lift_foreign_return( ffi_return: Self::ReturnType, call_status: RustCallStatus, ) -> Self
§fn lift_error(_buf: RustBuffer) -> Self
fn lift_error(_buf: RustBuffer) -> Self
§fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
source§impl<UT> LowerError<UT> for Geoname
impl<UT> LowerError<UT> for Geoname
source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
source§impl<UT> LowerReturn<UT> for Geoname
impl<UT> LowerReturn<UT> for Geoname
source§type ReturnType = <Geoname as Lower<UT>>::FfiType
type ReturnType = <Geoname as Lower<UT>>::FfiType
source§fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
impl Eq for Geoname
Auto Trait Implementations§
impl Freeze for Geoname
impl RefUnwindSafe for Geoname
impl Send for Geoname
impl Sync for Geoname
impl Unpin for Geoname
impl UnwindSafe for Geoname
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<>
Read more