Expand description
Build iTerm2 Inline Images Protocol string
Examples
let bytes = "abcdefg".as_bytes().to_vec();
let result = iterm2img::from_bytes(bytes)
.name("xyz".to_string())
.width(100)
.height(200)
.preserve_aspect_ratio(false)
.inline(true)
.build();
let expected = "\x1b]1337;File=size=7;name=xyz;width=100;height=200;preserve_aspect_ratio=0;inline=1:YWJjZGVmZw==\u{0007}";
assert_eq!(result, expected);
Structs
- builder
Functions
- returns builder from bytes