pub struct Index { /* private fields */ }Expand description
The code reference of one site.
Implementations§
Source§impl Index
impl Index
Sourcepub fn page(&self, path: &Path) -> Option<Page>
pub fn page(&self, path: &Path) -> Option<Page>
The page at path — a lexical path in the served folder — if it is
one of the reference’s. An alias names the item it stands for.
Sourcepub fn listed(&self, page: &Page) -> PathBuf
pub fn listed(&self, page: &Page) -> PathBuf
The page the sidebar lists for page: its own, or — for a member,
which the sidebar leaves to its type’s page — its type’s.
Sourcepub fn searched(&self) -> Vec<Searched>
pub fn searched(&self) -> Vec<Searched>
Every page of the reference as search reads it: each item’s and each member’s, in path order.
The sidebar’s tree under a Topics entry for the page at path: for a
namespace, its crates; under each module, its modules and types by
kind. Functions and members are left to the pages, so the tree every
page carries stays small.
Sourcepub fn ids(&self, path: &Path) -> Option<Vec<String>>
pub fn ids(&self, path: &Path) -> Option<Vec<String>>
The ids path’s page holds, for a link’s #fragment; None when
path is no page of the reference.
Sourcepub fn closest(&self, path: &Path) -> Option<String>
pub fn closest(&self, path: &Path) -> Option<String>
The page nearest to path, which names none: the item of the same
last name, else the closest path by edit distance.
Sourcepub fn files(&self) -> Vec<PathBuf>
pub fn files(&self) -> Vec<PathBuf>
Every file the reference is made from, for a publish to carry: each
namespace’s source files, the Cargo.toml that names each one’s
crate, its query file, and every prose file.
Auto Trait Implementations§
impl !Freeze for Index
impl Forget for Index
impl RefUnwindSafe for Index
impl Send for Index
impl Sync for Index
impl Unpin for Index
impl UnsafeUnpin for Index
impl UnwindSafe for Index
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> Fruit for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more