Mountain/IPC/UriComponents.rs
1#![allow(non_snake_case, dead_code)]
2
3//! # UriComponents - VS Code marshalling helpers
4//!
5//! Centralised builders for VS Code `UriComponents` payloads. The
6//! renderer's reviver (`_transformIncomingURIs` in `uriIpc.ts`) walks
7//! every response object and only calls `URI.revive()` on nested
8//! objects tagged with `$mid === MarshalledId.Uri (= 1)`. An untagged
9//! `UriComponents` reaches callers as a plain bag - `uri.with is not a
10//! function`, `uri.fsPath` undefined - and the sidebar / icon loader /
11//! `joinPath` chain silently breaks.
12//!
13//! Layout (one export per file, file name = identity):
14//! - `MID_URI::VALUE` - the magic marshalling constant.
15//! - `StampMidUri::Fn` - tag a `Value::Object` with `$mid: 1`.
16//! - `FromFilePath::Fn` - `file://`-scheme builder from an absolute path.
17//! - `FromUrl::Fn` - generic-scheme builder from a URL string.
18//! - `Normalize::Fn` - accept string / object / missing and return a tagged URI
19//! bag.
20
21pub mod FromFilePath;
22pub mod FromUrl;
23pub mod MID_URI;
24pub mod Normalize;
25pub mod StampMidUri;