rops 0.1.7

SOPS-like library in pure Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use serde::{de::DeserializeOwned, Serialize};

use crate::*;

pub trait FileFormat: Sized {
    type Map: FileFormatMapAdapter;

    type SerializeError: std::error::Error + Send + Sync + 'static;
    type DeserializeError: std::error::Error + Send + Sync + 'static;

    fn serialize_to_string<T: Serialize>(t: &T) -> Result<String, Self::SerializeError>;

    fn deserialize_from_str<T: DeserializeOwned>(str: &str) -> Result<T, Self::DeserializeError>;
}