Struct matcher_py::MatchResult
source · pub struct MatchResult<'a>(/* private fields */);
Expand description
A structure representing a match result from the Matcher.
This wraps around the MatchResultRs type from the matcher_rs library, allowing it to be used within this module’s context.
The lifetime parameter 'a
ensures that the MatchResult does not outlive
the data it references.
Trait Implementations§
source§impl<'a> IntoPy<Py<PyAny>> for MatchResult<'a>
impl<'a> IntoPy<Py<PyAny>> for MatchResult<'a>
source§fn into_py(self, py: Python<'_>) -> PyObject
fn into_py(self, py: Python<'_>) -> PyObject
Converts a MatchResult instance into a Python dictionary (PyObject).
This implementation of IntoPy enables MatchResult to be translated into a Python dictionary, making it accessible and manipulatable in the Python environment.
The resulting dictionary will have the following keys:
"match_id"
: The identifier for the match."table_id"
: The identifier for the table."word_id"
: The identifier for the word."word"
: The actual word as a string slice reference."similarity"
: The similarity score of the match.
§Parameters
self
: The MatchResult instance to be converted.py
: The Python interpreter instance.
§Returns
A PyObject in the form of a Python dictionary, containing the match result details.
Auto Trait Implementations§
impl<'a> Freeze for MatchResult<'a>
impl<'a> RefUnwindSafe for MatchResult<'a>
impl<'a> Send for MatchResult<'a>
impl<'a> Sync for MatchResult<'a>
impl<'a> Unpin for MatchResult<'a>
impl<'a> UnwindSafe for MatchResult<'a>
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