Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
Loading...
Searching...
No Matches
portals::SearchItem Struct Reference

Immutable copied top-K item. It never owns the source corpus or worker index. More...

#include <search.hpp>

Public Member Functions

 SearchItem ()=default
 Construct an empty item inside a checked allocation boundary.
 SearchItem (const SearchItem &)=default
 Copy only bounded presentation and highlight data.
SearchItem & operator= (const SearchItem &)=default
 SearchItem (SearchItem &&other)
 Transfer output through a potentially throwing empty-container construction. MSVC checked iterators allocate a proxy even when moving an empty vector.
SearchItem & operator= (SearchItem &&other) noexcept
 Transfer bounded output without allocating another container proxy.
const GraphemeText & text () const noexcept

Public Attributes

std::shared_ptr< const detail::PreparedListText > presentation
 Bounded prevalidated worker display.
std::vector< SearchHighlight > highlights = std::vector<SearchHighlight>(0)
 Whole original grapheme ranges.
SearchRank rank
 Exact deterministic provider rank.

Detailed Description

Immutable copied top-K item. It never owns the source corpus or worker index.

Constructor & Destructor Documentation

◆ SearchItem()

portals::SearchItem::SearchItem ( SearchItem && other)
inline

Transfer output through a potentially throwing empty-container construction. MSVC checked iterators allocate a proxy even when moving an empty vector.

Parameters
otherBounded item whose presentation and highlights are transferred.

Member Function Documentation

◆ operator=() [1/2]

SearchItem & portals::SearchItem::operator= ( const SearchItem & )
default
Returns
Reference to this item after copying bounded output.

◆ operator=() [2/2]

SearchItem & portals::SearchItem::operator= ( SearchItem && other)
inlinenoexcept

Transfer bounded output without allocating another container proxy.

Parameters
otherBounded item whose presentation and highlights are transferred.
Returns
Reference to this item after the transfer.

◆ text()

const GraphemeText & portals::SearchItem::text ( ) const
inlinenoexcept
Returns
Original owning label text; borrow remains valid while this item's presentation lives.

The documentation for this struct was generated from the following file: