Struct docsearch::SearchPage
source · pub struct SearchPage<'a> { /* private fields */ }
Expand description
Initial state when starting a new search. Use the Self::url
function to get the URL to
download content from. The web page content must then be passed to Self::find_index
to get
to the next state.
Implementations§
source§impl<'a> SearchPage<'a>
impl<'a> SearchPage<'a>
sourcepub fn url(&self) -> &str
pub fn url(&self) -> &str
URL to content that should be retrieved and passed to Self::find_index
.
sourcepub fn find_index(self, body: &str) -> Result<SearchIndex<'a>>
pub fn find_index(self, body: &str) -> Result<SearchIndex<'a>>
Try to find the index in the content downloaded from Self::url
, effectively transferring
to the next state in retrieving an Index
instance.
Auto Trait Implementations§
impl<'a> RefUnwindSafe for SearchPage<'a>
impl<'a> Send for SearchPage<'a>
impl<'a> Sync for SearchPage<'a>
impl<'a> Unpin for SearchPage<'a>
impl<'a> UnwindSafe for SearchPage<'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