// Preferred way to lookup the encoded id for a given logical string value.
// If the value exists then the `Ok` variant with the encoded id is returned,
// otherwise the `Err` variant is returned with the appropriate ordinal id
// for the value if that value did exist.
//
// The `Err` variant can be useful when applying predicates directly to the
// encoded data.
Preferred way to lookup the encoded id for a given logical string value.
If the value exists then the `Ok` variant with the encoded id is returned,
otherwise the `Err` variant is returned with the appropriate ordinal id
for the value if that value did exist.

The `Err` variant can be useful when applying predicates directly to the
encoded data.
Preferred way to lookup the encoded id for a given logical string value . If the value exists then the ` Ok ` variant with the encoded id is returned otherwise the ` Err ` variant is returned with the appropriate ordinal id for the value if that value did exist . The ` Err ` variant can be useful when applying predicates directly to the encoded data .
fn encoded_id(&self, value: Option<&str>) -> Result<u32, u32> {
        match self
            .entries
            .binary_search_by(|entry| entry.as_deref().cmp(&value))
        {
            Ok(id) => Ok(id as u32),
            Err(id) => Err(id as u32),
        }
    }
fn encoded_id ( & self , value : Option < & str > ) -> Result < u32 , u32 > { match self . entries . binary_search_by ( | entry | entry . as_deref ( ) . cmp ( & value ) ) { Ok ( id ) => Ok ( id as u32 ) , Err ( id ) => Err ( id as u32 ) , } }
Preferred way to lookup the encoded id for a given logical string value.
Preferred way to lookup the encoded id for a given logical string value .
&self
value
Option<&str>