[−][src]Struct rustdoc::passes::collect_intra_doc_links::LinkCollector

struct LinkCollector<'a, 'tcx> {
    cx: &'a DocContext<'tcx>,
    mod_ids: Vec<DefId>,
    kind_side_channel: Cell<Option<(DefKind, DefId)>>,
}

Fields

cx: &'a DocContext<'tcx>mod_ids: Vec<DefId>kind_side_channel: Cell<Option<(DefKind, DefId)>>

This is used to store the kind of associated items, because clean and the disambiguator code expect them to be different. See the code for associated items on inherent impls for details.

Implementations

impl<'a, 'tcx> LinkCollector<'a, 'tcx>[src]

fn new(cx: &'a DocContext<'tcx>) -> Self[src]

fn variant_field<'path>(
    &self,
    path_str: &'path str,
    current_item: &Option<String>,
    module_id: DefId
) -> Result<(Res, Option<String>), ErrorKind<'path>>
[src]

fn resolve_primitive_associated_item<'path>(
    &self,
    prim_ty: PrimTy,
    ns: Namespace,
    module_id: DefId,
    item_name: Symbol,
    item_str: &'path str
) -> Result<(Res, Option<String>), ErrorKind<'path>>
[src]

fn macro_resolve(
    &self,
    path_str: &'a str,
    module_id: DefId
) -> Result<Res, ResolutionFailure<'a>>
[src]

Resolves a string as a macro.

fn resolve_path(
    &self,
    path_str: &str,
    ns: Namespace,
    module_id: DefId
) -> Option<Res>
[src]

fn resolve<'path>(
    &self,
    path_str: &'path str,
    ns: Namespace,
    current_item: &Option<String>,
    module_id: DefId,
    extra_fragment: &Option<String>
) -> Result<(Res, Option<String>), ErrorKind<'path>>
[src]

Resolves a string as a path within a particular namespace. Also returns an optional URL fragment in the case of variants and methods.

fn check_full_res(
    &self,
    ns: Namespace,
    path_str: &str,
    module_id: DefId,
    current_item: &Option<String>,
    extra_fragment: &Option<String>
) -> Option<Res>
[src]

Used for reporting better errors.

Returns whether the link resolved 'fully' in another namespace. 'fully' here means that all parts of the link resolved, not just some path segments. This returns the Res even if it was erroneous for some reason (such as having invalid URL fragments or being in the wrong namespace).

impl<'_, '_> LinkCollector<'_, '_>[src]

fn resolve_with_disambiguator(
    &self,
    disambiguator: Option<Disambiguator>,
    item: &Item,
    dox: &str,
    path_str: &str,
    current_item: &Option<String>,
    base_node: DefId,
    extra_fragment: Option<String>,
    ori_link: &str,
    link_range: Option<Range<usize>>
) -> Option<(Res, Option<String>)>
[src]

Trait Implementations

impl<'a, 'tcx> DocFolder for LinkCollector<'a, 'tcx>[src]

Auto Trait Implementations

impl<'a, 'tcx> !RefUnwindSafe for LinkCollector<'a, 'tcx>

impl<'a, 'tcx> !Send for LinkCollector<'a, 'tcx>

impl<'a, 'tcx> !Sync for LinkCollector<'a, 'tcx>

impl<'a, 'tcx> Unpin for LinkCollector<'a, 'tcx> where
    'tcx: 'a, 

impl<'a, 'tcx> !UnwindSafe for LinkCollector<'a, 'tcx>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithConstness for T[src]