pub enum DocumentAddress {
Markdown {
path: String,
origin: MarkdownOrigin,
},
Manual {
name: String,
manual_section: String,
},
}Expand description
Stable selector for one discoverable document candidate.
Variants§
Markdown
A Markdown document registered in the document catalog.
Fields
origin: MarkdownOriginStorage namespace containing the relative path.
Manual
An installed native manual page.
Implementations§
Source§impl DocumentAddress
impl DocumentAddress
Sourcepub fn parse_catalog_path(value: &str) -> Option<DocumentAddress>
pub fn parse_catalog_path(value: &str) -> Option<DocumentAddress>
Parse one complete catalog path into its logical document address.
Accepted paths are documents/<path>, sources/<source>/<path>, and
manual/<section>/<name>. Physical filesystem paths are never
interpreted here.
Sourcepub fn relative_path(&self) -> String
pub fn relative_path(&self) -> String
Stable path relative to its storage namespace.
Sourcepub fn catalog_path(&self) -> String
pub fn catalog_path(&self) -> String
Complete, unambiguous path in ManT’s unified document tree.
Sourcepub fn resolve_document_reference(
&self,
reference: &str,
) -> Option<DocumentAddress>
pub fn resolve_document_reference( &self, reference: &str, ) -> Option<DocumentAddress>
Resolve an extension-free relative Markdown document reference inside the current registered namespace.
The result never crosses from personal documents into a configured source, or between configured sources. References that would escape the namespace root are rejected.
Trait Implementations§
Source§impl Clone for DocumentAddress
impl Clone for DocumentAddress
Source§fn clone(&self) -> DocumentAddress
fn clone(&self) -> DocumentAddress
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DocumentAddress
impl Debug for DocumentAddress
Source§impl<'de> Deserialize<'de> for DocumentAddress
impl<'de> Deserialize<'de> for DocumentAddress
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DocumentAddress, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DocumentAddress, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for DocumentAddress
Source§impl JsonSchema for DocumentAddress
impl JsonSchema for DocumentAddress
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more