Struct libradicl::BarcodeLookupMap [−][src]
Fields
barcodes: Vec<u64>
Implementations
The find function searches for the barcode query
in the
BarcodeLookupMap. It returns a tuple (Option<usize>, usize)
where
the first element is either Some(usize) or None. If
Some(usize) is returned, this is the index of a matching/neighboring barcode
if None is returned, then no match was found. The second element is either
0, 1 or 2. If 0, no match was found; if 1 a unique match was found, if 2
then 2 or more equally good matches were found.
The parameter try_exact
controls whether a an exact search is performed
or not. If this parameter is true, an exact search is performed before
a neighbor search. Otherwise, the exact search is skipped.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for BarcodeLookupMap
impl Send for BarcodeLookupMap
impl Sync for BarcodeLookupMap
impl Unpin for BarcodeLookupMap
impl UnwindSafe for BarcodeLookupMap
Blanket Implementations
Mutably borrows from an owned value. Read more
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub unsafe fn to_subset_unchecked(&self) -> SS
pub unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.