Crates.io | rescue-blanket |
lib.rs | rescue-blanket |
version | 0.2.0 |
source | src |
created_at | 2022-02-02 19:34:23.40856 |
updated_at | 2022-02-26 12:16:44.651076 |
description | Escape values while they are being formatted |
homepage | |
repository | |
max_upload_size | |
id | 525831 |
size | 12,359 |
This crate provides Escaped
, a wrapper for escaping special characters and
constructs in values while formatting them, and Escaper
, a trait for defining
escaping logic. In addition, it provides Escapable
, an augmentation trait for
facilitating wrapping values in Escaped
.
The wrapping approach allows escaping arbitrary values implementing Display
without the need to buffer them.
use rescue_blanket::Escapable;
println!("foo=\"{}\"", "bar=\"baz\"".escaped_with(char::escape_default));
This work is provided under the MIT license. See LICENSE
for more details.