- Added the
is_anycast
field to theTraits
struct. Pull request by Skye. GitHub #73.
- Added
lookup_prefix
to return the prefix length for the network associated with the IP address. Pull request by Marek Vavruša. GitHub #26.
- A
within
method has been added to the reader to allow iterating over all records in the database. Pull request by Ross McFarland. Github #50. - Database structs in
maxminddb::geoip2
have been updated. Most noticeably, anEnterprise
struct has been added and themodel
module has been replaced bycity
andcountry
modules. Also, several missing fields have been added. Mmap
is now re-exported for convenience. Pull request by zhuhaow. GitHub #54.- Upgraded memmap2 dependency.
- Reduce the amount of code generated by shrinking generic methods. Pull request by Markus Westerlind. GitHub #49.
- Use
try_into
when decoding floating point values. Pull request by Sebastian Mayr. GitHub #47.
- Switch from
memmap
tomemmap2
. Pull request by Gleb Pomykalov. GitHub #46.
- The
memchr
crate is now used to improve the performance of finding the metadata start. Pull request by Markus Westerlind. GitHub #44.
- Correct handling of pointers in the database metadata section. This
bug caused the latest GeoIP2 ISP database from MaxMind to fail to
load with an
InvalidDatabaseError
due to an invalid data type. Reported by Marwes-Imperva. GitHub #45.
- Minor cleanup.
- Restore compatibility with targets that don't support 128-bit integers. Pull request by Filip. GitHub #41.
- Unsigned 128-bit integers are now decoded to a
u128
rather than a[u8]
. Pull request by moschroe. GitHub #40.
- This release includes major performance improvements and code cleanup. Pull request by Sebastian Mayr. GitHub #37.
- Remove crate options leftover from before Rust 1.0. In particular,
this crate no longer specifies
crate_type
. This should allow you to compile it withpanic = "abort"
. Reported by ye2020. GitHub #33.
- BREAKING CHANGE: All Strings in the
geoip2
structs are not returned as references. This was done to provide a significant performance improvement when ownership is not needed. Pull request by Matthew Wynn. GitHub #31. - A new opt-in feature,
unsafe-str-decode
, has been added that will skip UTF-8 validation when decoding strings. You should only use this when you trust that the MaxMind DB is valid and contains valid UTF-8 strings. This provides a modest performance improvement. Pull request by Matthew Wynn. GitHub #31. - Many other internal improvements to reduce the number of allocations.
- Missing models for
DensityIncome
,Domain
, andAsn
were added and the missingis_in_european_union
field was added to theCountry
model. Pull request by Sebastian Nadorp. GitHub #19. - More details are now included in the
Display
implementation forMaxMindDBError
. Pull request by Mike Cooper. GitHub #20.
Reader::open
has been removed. You should useReader::open_readfile
orReader::open_mmap
. Pull request by kpcyrd. GitHub #17 & #18.Reader::open_readfile
no longer depends onunsafe
. Pull request by kpcyrd. GitHub #17 & #18.
- An optional
mmap
cfg feature flag has been added. When set,open
will use thememmap
crate to memory map the database file rather than reading it from file. In addition toopen
,open_readfile
andopen_mmap
are available. PR by moschroe. GitHub #16. Reader::open
now takes anAsRef<Path>
. Also, #16.Reader::from_buf
allows using an existing buffer instead of specifying a database file. PR by kpcyrd. GitHub #15.
- Derive
Serialize
for GeoIP2 models. Pull request by Bryan Gilbert. GitHub #11.
- Update logger to 0.4 and env_logger to 0.5.
- Implement unimplemented deserialize methods.
- API CHANGE: Switch to Serde for deserialization. Data structures being
deserialized to must implement the
Deserialize
trait. Pull request by Wesley Moore. GitHub #5.
- Update
log
to 0.3.7 andrustc-serialize
to 0.3.23.
- Update
rustc-serialize
to 0.3.21.
- API CHANGE:
lookup
takes anIpAddr
again instead of aSocketAddr
. We previously switched toSocketAddr
afterIpAddr
had been deprecated, but it has since been re-added.