pub struct LookupRef {
pub found: bool,
pub data_offset: u32,
pub prefix_len: u8,
pub result_type: u8,
}Expand description
Zero-allocation lookup result for C API. Stores offsets into mmap’d data instead of owned values.
Fields§
§found: boolWhether a match was found
data_offset: u32Offset to data in the MMDB data section (0 if not found or no data)
prefix_len: u8Network prefix length (for IP results, 0 for patterns)
result_type: u8Result type: 0=not found, 1=ip, 2=pattern
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LookupRef
impl RefUnwindSafe for LookupRef
impl Send for LookupRef
impl Sync for LookupRef
impl Unpin for LookupRef
impl UnwindSafe for LookupRef
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more