Struct ip2location_bin_format::querier::Querier
source · [−]pub struct Querier<S> {
pub header: HeaderSchema,
pub index_v4: IndexV4Querier,
pub index_v6: Option<IndexV6Querier>,
pub records_v4: RecordsV4Querier<S>,
pub records_v6: Option<RecordsV6Querier<S>>,
pub content: ContentQuerier<S>,
}Fields
header: HeaderSchemaindex_v4: IndexV4Querierindex_v6: Option<IndexV6Querier>records_v4: RecordsV4Querier<S>records_v6: Option<RecordsV6Querier<S>>content: ContentQuerier<S>Implementations
sourceimpl<S> Querier<S> where
S: AsyncSeek + AsyncRead + Unpin,
impl<S> Querier<S> where
S: AsyncSeek + AsyncRead + Unpin,
pub async fn lookup(
&mut self,
ip: IpAddr,
selected_fields: Option<&[RecordField]>
) -> Result<Option<(IpAddr, IpAddr, RecordFieldContents)>, LookupError>
pub async fn lookup_ipv4(
&mut self,
ip: Ipv4Addr,
selected_fields: Option<&[RecordField]>
) -> Result<Option<(IpAddr, IpAddr, RecordFieldContents)>, LookupError>
pub async fn lookup_ipv6(
&mut self,
ip: Ipv6Addr,
selected_fields: Option<&[RecordField]>
) -> Result<Option<(IpAddr, IpAddr, RecordFieldContents)>, LookupError>
Trait Implementations
Auto Trait Implementations
impl<S> RefUnwindSafe for Querier<S> where
S: RefUnwindSafe,
impl<S> Send for Querier<S> where
S: Send,
impl<S> Sync for Querier<S> where
S: Sync,
impl<S> Unpin for Querier<S> where
S: Unpin,
impl<S> UnwindSafe for Querier<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