pub use seal::Access;
pub struct ReadOnly;
pub struct WriteAs<'a, Signer: crypto::Signer> {
pub(super) signer: &'a Signer,
}
impl<'a, Signer: crypto::Signer> WriteAs<'a, Signer> {
pub fn new(signer: &'a Signer) -> Self {
Self { signer }
}
}
#[allow(private_interfaces)]
mod seal {
enum Seal {}
pub trait Access {
fn seal(&self, _: Seal);
}
impl Access for super::ReadOnly {
fn seal(&self, _: Seal) {}
}
impl<Signer: crypto::Signer> Access for super::WriteAs<'_, Signer> {
fn seal(&self, _: Seal) {}
}
}