Crate scoop_shim

Source
Expand description

§Scoop Shims

§Usage

use scoop_shim::Shim;

// Serialize a shim
let shim = Shim::new(
    std::path::PathBuf::from("sfsu.exe"),
    vec!["search".to_string()],
);

shim.to_string(); // "path = \"sfsu.exe\"\r\nargs = search"

// Deserialize a shim
let shim = scoop_shim::from_str("path = \"sfsu.exe\"\r\nargs = search").unwrap();

assert_eq!(shim.path(), std::path::PathBuf::from("sfsu.exe"));
assert_eq!(shim.args(), ["search".to_string()]);

Made with 💗 by Juliette Cordor

Structs§

Shim
Scoop shim struct

Enums§

Error
Errors that can occur when parsing or serializing a shim.

Functions§

from_reader
Parse a Shim from a reader
from_str
Parse a Shim from a string
to_string
Serialize a Shim to a string
to_writer
Write the shim to a writer