pub enum MappedPath {
Git {
repo: String,
path: String,
rev: String,
},
Hg {
repo: String,
path: String,
rev: String,
},
S3 {
bucket: String,
digest: String,
path: String,
},
Cargo {
registry: String,
crate_name: String,
version: String,
path: String,
},
}Expand description
A special source file path for source files which are hosted online.
About “special path” strings: Special paths strings are a string serialization of a mapped path. The format of this string was adopted from the format used in Firefox Breakpad .sym files. This format is also used in the Tecken symbolication API, and internally in the Firefox Profiler.
Variants§
Git
A path to a file in a git repository.
Fields
repo: StringThe web host + root path where the repository is hosted, e.g. "github.com/rust-lang/rust".
Hg
A path to a file in a mercurial repository (hg).
Fields
S3
A path to a file hosted in an S3 bucket.
Fields
Cargo
A path to a file in a Rust package which is hosted in a cargo registry (usually on crates.io).
Implementations§
Source§impl MappedPath
impl MappedPath
Sourcepub fn from_special_path_str(special_path: &str) -> Option<Self>
pub fn from_special_path_str(special_path: &str) -> Option<Self>
Parse a “special path” string. These types of strings are found in Breakpad .sym files on the Mozilla symbol server.
So this parsing code basically exists here because this crate supports obtaining
symbols from Breakpad symbol files, so that consumers don’t have parse this
syntax when looking up symbols from a SymbolMap from such a .sym file.
Sourcepub fn from_url(url: &str) -> Option<Self>
pub fn from_url(url: &str) -> Option<Self>
Detect some URLs of plain text files and convert them to a MappedPath.
Sourcepub fn to_special_path_str(&self) -> String
pub fn to_special_path_str(&self) -> String
Serialize this mapped path to a string, using the “special path” syntax.
Sourcepub fn display_path(&self) -> String
pub fn display_path(&self) -> String
Create a short, display-friendly form of this path.
Trait Implementations§
Source§impl Clone for MappedPath
impl Clone for MappedPath
Source§fn clone(&self) -> MappedPath
fn clone(&self) -> MappedPath
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more