pub enum AssocAnchorKind {
Method,
Type,
Constant,
Variant,
StructField,
}Expand description
Which rustdoc anchor family a Parent::member path resolves through.
Variants§
Method
Inherent method, defaulted trait method, or required trait method.
Type
Associated type declared inside a trait.
Constant
Associated constant declared on a type or trait.
Variant
Enum variant (Option::Some).
StructField
Struct or union field (Range::start).
Implementations§
Source§impl AssocAnchorKind
impl AssocAnchorKind
Sourcepub fn anchor_prefixes(self) -> &'static [&'static str]
pub fn anchor_prefixes(self) -> &'static [&'static str]
Anchor id prefixes to try, in probe order.
Sourcepub fn primary_prefix(self) -> &'static str
pub fn primary_prefix(self) -> &'static str
Prefix the URL builder bakes into the planned fragment.
Only one fragment fits in a URL; the extractor still tries every prefix of the family against the fetched page.
Sourcepub fn parent_kind_probe(self) -> &'static [ItemKind]
pub fn parent_kind_probe(self) -> &'static [ItemKind]
Parent page kinds to probe, in order.
Single source of truth: the live probe in crate::docs_rs and the
suggestion probe in crate::ops must walk the same kinds in the same
order, or a member found by one stays invisible to the other.
Sourcepub fn parent_kind_probe_names(
self,
) -> impl Iterator<Item = &'static str> + Clone
pub fn parent_kind_probe_names( self, ) -> impl Iterator<Item = &'static str> + Clone
Self::parent_kind_probe as wire strings for the --dry-run envelope.
Derived from the kind list rather than mirrored by hand. Hand-kept string
mirrors used to sit right below the “single source of truth” promise
above, and they made --dry-run capable of lying: reordering the kinds
without reordering the strings would have published a probe order the
live fetch never walks, to an agent that plans on exactly that field.
Sourcepub fn anchor_ids(self, name: &str) -> Vec<String>
pub fn anchor_ids(self, name: &str) -> Vec<String>
Build the ordered anchor ids a live fetch will try for name.
Trait Implementations§
Source§impl Clone for AssocAnchorKind
impl Clone for AssocAnchorKind
impl Copy for AssocAnchorKind
Source§impl Debug for AssocAnchorKind
impl Debug for AssocAnchorKind
impl Eq for AssocAnchorKind
Source§impl PartialEq for AssocAnchorKind
impl PartialEq for AssocAnchorKind
impl StructuralPartialEq for AssocAnchorKind
Auto Trait Implementations§
impl Freeze for AssocAnchorKind
impl RefUnwindSafe for AssocAnchorKind
impl Send for AssocAnchorKind
impl Sync for AssocAnchorKind
impl Unpin for AssocAnchorKind
impl UnsafeUnpin for AssocAnchorKind
impl UnwindSafe for AssocAnchorKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.