pub struct Link { /* private fields */ }Expand description
A typed reference with the string grammar [system:]kind[:id].
Implementations§
Source§impl Link
impl Link
pub fn new(raw: impl Into<String>) -> Link
Sourcepub fn external(system: &str, kind: &str, id: impl Display) -> Link
pub fn external(system: &str, kind: &str, id: impl Display) -> Link
An external link: system:kind:id.
pub fn raw(&self) -> &str
Sourcepub fn parts<'a>(&'a self, systems: &[&str]) -> Parts<'a>
pub fn parts<'a>(&'a self, systems: &[&str]) -> Parts<'a>
Decompose against the declared system set. Grammar only — no judgment:
the head is a system iff declared, else it is the kind and the
remainder (which may contain : and /) is the id, verbatim.
Sourcepub fn find_inline(text: &str) -> Vec<Link>
pub fn find_inline(text: &str) -> Vec<Link>
Every [[…]] occurrence in prose. Malformed brackets (an unclosed
[[) are ignored; whatever sits inside a well-formed pair becomes a
link (interpretation happens later, like every other link).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Link
impl<'de> Deserialize<'de> for Link
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Link
Source§impl JsonSchema for Link
impl JsonSchema for Link
Source§fn json_schema(_: &mut SchemaGenerator) -> Schema
fn json_schema(_: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for Link
Auto Trait Implementations§
impl Freeze for Link
impl RefUnwindSafe for Link
impl Send for Link
impl Sync for Link
impl Unpin for Link
impl UnsafeUnpin for Link
impl UnwindSafe for Link
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
Mutably borrows from an owned value. Read more