pub struct Ipbase { /* private fields */ }
Expand description
The main struct of the crate giving access to the ipbase. Create a new instance of the struct with your api key as parameter.
Implementations§
Source§impl<'a> Ipbase
impl<'a> Ipbase
Sourcepub fn new(api_key: &'a str) -> Result<Self, IpbaseError>
pub fn new(api_key: &'a str) -> Result<Self, IpbaseError>
Creates a new instance of the Ipbase struct by passing your api key as function parameter.
pub async fn status(&self) -> Result<DetailsResponse, IpbaseError>
pub async fn info( &self, ip: &'a str, language: &'a str, ) -> Result<DetailsResponse, IpbaseError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Ipbase
impl !RefUnwindSafe for Ipbase
impl Send for Ipbase
impl Sync for Ipbase
impl Unpin for Ipbase
impl !UnwindSafe for Ipbase
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