Struct ipgeolocate::Locator
source · pub struct Locator {
pub ip: String,
pub latitude: String,
pub longitude: String,
pub city: String,
pub region: String,
pub country: String,
pub timezone: String,
pub isp: String,
}
Expand description
This is the main struct for making requests to the APIs.
Fields§
§ip: String
Returns the IP address.
latitude: String
Latitude of the IP address.
longitude: String
Longitude of the IP address.
city: String
City of the IP address.
region: String
Region or state of the IP address.
country: String
Country of the IP address.
timezone: String
Timezone of the IP address.
isp: String
ISP of the IP address
Implementations§
source§impl Locator
impl Locator
sourcepub async fn get_ipv4(ip: Ipv4Addr, service: Service) -> Result<Self, GeoError>
pub async fn get_ipv4(ip: Ipv4Addr, service: Service) -> Result<Self, GeoError>
Gets IP information from an Ipv4Addr
sourcepub async fn get_ipv6(ip: Ipv6Addr, service: Service) -> Result<Self, GeoError>
pub async fn get_ipv6(ip: Ipv6Addr, service: Service) -> Result<Self, GeoError>
Gets IP information from an Ipv6Addr
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Locator
impl Send for Locator
impl Sync for Locator
impl Unpin for Locator
impl UnwindSafe for Locator
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
Mutably borrows from an owned value. Read more