pub struct LinkRegistry { /* private fields */ }Expand description
Registry for OSC 8 hyperlink URLs.
Implementations§
Source§impl LinkRegistry
impl LinkRegistry
Sourcepub fn register(&mut self, url: &str) -> u32
pub fn register(&mut self, url: &str) -> u32
Register a URL and return its link ID.
If the URL is already registered, returns the existing ID.
Sourcepub fn unregister(&mut self, id: u32)
pub fn unregister(&mut self, id: u32)
Unregister a link by ID.
Sourcepub fn estimate_memory(&self) -> usize
pub fn estimate_memory(&self) -> usize
Estimate heap memory usage in bytes.
This is an approximate accounting used by runtime guardrails/telemetry.
Trait Implementations§
Source§impl Clone for LinkRegistry
impl Clone for LinkRegistry
Source§fn clone(&self) -> LinkRegistry
fn clone(&self) -> LinkRegistry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LinkRegistry
impl Debug for LinkRegistry
Source§impl Default for LinkRegistry
impl Default for LinkRegistry
Source§fn default() -> LinkRegistry
fn default() -> LinkRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LinkRegistry
impl RefUnwindSafe for LinkRegistry
impl Send for LinkRegistry
impl Sync for LinkRegistry
impl Unpin for LinkRegistry
impl UnsafeUnpin for LinkRegistry
impl UnwindSafe for LinkRegistry
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