pub trait Reader {
fn read(&mut self) -> Result<Keyset, TinkError>;
fn read_encrypted(&mut self) -> Result<EncryptedKeyset, TinkError>;
}
Expand description
Reader
knows how to read a Keyset
or an
EncryptedKeyset
from some source. In order to turn a Reader
into a keyset::Handle
for use, callers must use
insecure::new_handle
or Handle::read
(with encryption).
Required methods
Return a (cleartext) Keyset
object from the underlying source.
fn read_encrypted(&mut self) -> Result<EncryptedKeyset, TinkError>
fn read_encrypted(&mut self) -> Result<EncryptedKeyset, TinkError>
Return an EncryptedKeyset
object from the underlying source.
Implementors
impl Reader for MemReaderWriter
impl<T: Read> Reader for BinaryReader<T>
impl<T: Read> Reader for JsonReader<T>
This is supported on crate feature
json
only.