Skip to main content

polyhook_core/
stdin_wrappers.rs

1use crate::{read_from, respond_to, HookEvent, HookResponse};
2
3pub fn read() -> Result<HookEvent, String> {
4    read_from(&mut std::io::stdin())
5}
6
7pub fn respond(response: &HookResponse) -> Result<(), String> {
8    respond_to(&mut std::io::stdout(), response)
9}