pub struct Directory { /* private fields */ }Expand description
The worlds directory.
Implementations§
Source§impl Directory
impl Directory
pub fn from_env() -> Self
pub fn is_open(&self) -> bool
pub fn close(&mut self)
Sourcepub fn toggle(&mut self)
pub fn toggle(&mut self)
Open/close the directory. Fetches the list the first time it’s opened.
Sourcepub fn ensure_loaded(&mut self)
pub fn ensure_loaded(&mut self)
Start fetching the world list if we don’t have it yet (without opening the panel) — so portal previews have data from the first frame.
Sourcepub fn lookup(&self, locator: &str) -> Option<&WorldEntry>
pub fn lookup(&self, locator: &str) -> Option<&WorldEntry>
Look up a listed world by Locator (ignoring #anchor / @when).
Sourcepub fn search(&mut self, query: &str)
pub fn search(&mut self, query: &str)
Ask the Waystone index for ranked places matching query — content
match + portal-graph in-degree, the live “Google of the Thread” call.
Call freely as the user types: identical queries are deduped, a newer
query replaces the in-flight one (last-typed wins), and an empty query
clears the results (the panel falls back to the plain list).
Sourcepub fn search_results(&self) -> Option<&[SearchHit]>
pub fn search_results(&self) -> Option<&[SearchHit]>
The ranked results for the current query, once landed.
Sourcepub fn search_loading(&self) -> bool
pub fn search_loading(&self) -> bool
Whether a ranked search is still in flight.
pub fn entries(&self) -> Option<&[WorldEntry]>
pub fn is_loading(&self) -> bool
pub fn error(&self) -> Option<&str>
Auto Trait Implementations§
impl !Sync for Directory
impl Freeze for Directory
impl RefUnwindSafe for Directory
impl Send for Directory
impl Unpin for Directory
impl UnsafeUnpin for Directory
impl UnwindSafe for Directory
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