pub trait Reader {
// Required methods
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§
Sourcefn read(&mut self) -> Result<Keyset, TinkError>
fn read(&mut self) -> Result<Keyset, TinkError>
Return a (cleartext) Keyset object from the underlying source.
Sourcefn 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>
Available on crate feature
json only.