plat/cliprich.rs#
Source: lib/plat/cliprich.rs
cliprich -- bounded rich clipboard records and Windows CF_HTML framing.
New opt-in API by clipboard_platform; no assembly counterpart.
CF_HTML: learn.microsoft.com/windows/win32/dataxchg/html-clipboard-format
/// Maximum combined payload of an opt-in multi-format clipboard write (64 MiB).
CLIP_RICH_MAX: usize = 64 << 20
fn clip_many_valid(entries: &[(u32, &[u8])]) -> boolValidate a multi-format text clipboard before replacing the previous contents. Formats must be distinct TEXT/HTML/RTF/DOCX; text and HTML are NUL-free UTF-8.fn clip_html_encode(fragment: &[u8]) -> Option<Vec<u8>>Wrap a UTF-8 HTML fragment in Windows CF_HTML, with byte offsets and final NUL.fn clip_html_decode(data: &[u8]) -> Option<Vec<u8>>Extract a UTF-8 fragment from CF_HTML. Reject invalid/overflowing offsets and UTF-8.