Struct ip2location_ip2proxy::bin_format::Database
source · [−]pub struct Database<S> {
pub inner: Querier<S>,
}Fields
inner: Querier<S>Implementations
sourceimpl<S> Database<S> where
S: AsyncSeek + AsyncRead + Unpin,
impl<S> Database<S> where
S: AsyncSeek + AsyncRead + Unpin,
pub async fn lookup(
&mut self,
ip: IpAddr,
selected_fields: impl Into<Option<&[RecordField]>>
) -> Result<Option<Record>, DatabaseLookupError>
pub async fn lookup_ipv4(
&mut self,
ip: Ipv4Addr,
selected_fields: impl Into<Option<&[RecordField]>>
) -> Result<Option<Record>, DatabaseLookupError>
pub async fn lookup_ipv6(
&mut self,
ip: Ipv6Addr,
selected_fields: impl Into<Option<&[RecordField]>>
) -> Result<Option<Record>, DatabaseLookupError>
Trait Implementations
Auto Trait Implementations
impl<S> RefUnwindSafe for Database<S> where
S: RefUnwindSafe,
impl<S> Send for Database<S> where
S: Send,
impl<S> Sync for Database<S> where
S: Sync,
impl<S> Unpin for Database<S> where
S: Unpin,
impl<S> UnwindSafe for Database<S> where
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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