Skip to main content

LinkProvider

Trait LinkProvider 

Source
pub trait LinkProvider: Send + Sync {
    // Required methods
    fn file_url(&self, path: &str) -> Option<String>;
    fn line_url(&self, path: &str, line: usize) -> Option<String>;
}
Expand description

Where file and line links point.

Required Methods§

Source

fn file_url(&self, path: &str) -> Option<String>

The URL for a file.

Source

fn line_url(&self, path: &str, line: usize) -> Option<String>

The URL for a line of a file’s new version.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl LinkProvider for Hyperlinker

Local file:// or editor links through a Hyperlinker.