Skip to main content

codesnap/
lib.rs

1//! CodeSnap is a tool to generate beautiful snapshots of your code snippets. It's a pure Rust library
2//! that provides a simple API to create snapshots of code snippets with syntax highlighting, line
3//! numbers, code theme and more.
4//!
5//! ## Quick start
6//!
7//! ```rust
8//! CodeSnap::default()
9//!     .code(
10//!         CodeBuilder::default()
11//!             .language("haskell")
12//!             .content(r#"print "Hello, CodeSnap!""#)
13//!             .build()?,
14//!     )
15//!     .watermark(WatermarkBuilder::default().content("YYM").build()?)
16//!     .build()?
17//!     .create_snapshot()?
18//!     .raw_data()?
19//!     .copy()?;
20//! ```
21//!
22//! Now try to paste the code snapshot to your friends! (Don't forget tell him that this was generated by CodeSnap! ^ ^)
23
24pub mod ansi;
25pub mod assets;
26mod components;
27pub mod config;
28pub mod edges;
29pub mod snapshot;
30pub mod themes;
31pub mod utils;