Skip to main content

anstyle_hyperlink/
lib.rs

1//! ANSI escape code hyperlink (OSC 8)
2//!
3//! For details on the protocol, see
4//! [Hyperlinks (a.k.a. HTML-like anchors) in terminal emulators](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda)
5//!
6//! To detect support, see [supports-hyperlinks](https://crates.io/crates/supports-hyperlinks)
7
8#![cfg_attr(not(feature = "std"), no_std)]
9#![cfg_attr(docsrs, feature(doc_cfg))]
10#![warn(missing_docs)]
11#![warn(clippy::std_instead_of_core)]
12#![warn(clippy::std_instead_of_alloc)]
13#![warn(clippy::print_stderr)]
14#![warn(clippy::print_stdout)]
15
16#[cfg(feature = "file")]
17mod file;
18#[cfg(feature = "file")]
19mod hostname;
20mod hyperlink;
21
22#[cfg(feature = "file")]
23pub use file::dir_to_url;
24#[cfg(feature = "file")]
25pub use file::file_to_url;
26#[cfg(feature = "file")]
27pub use file::path_to_url;
28#[cfg(feature = "file")]
29pub use file::Editor;
30#[cfg(feature = "file")]
31pub use file::ParseEditorError;
32#[cfg(feature = "file")]
33pub use hostname::hostname;
34pub use hyperlink::Hyperlink;
35
36#[doc = include_str!("../README.md")]
37#[cfg(doctest)]
38pub struct ReadmeDoctests;