[−][src]Function osmflat::find_tag_by
pub fn find_tag_by(
archive: &Osm,
range: Range<u64>,
predicate: impl FnMut(&[u8], &[u8]) -> bool
) -> Option<&[u8]>
Finds the first tag in the given range
which satisfies the predicate
applied to the key and value and returns the corresponding value.
Note that the predicate function is called on the whole key block and value
block. These are zero (\0
) divided blocks of bytes that start at the key
resp. value, and contain the rest string data. In particular, the len of
the block is not the len of the key resp. value. The user is responsible
to check or find the zero terminator.