Reader

Trait Reader 

Source
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§

Source

fn read(&mut self) -> Result<Keyset, TinkError>

Return a (cleartext) Keyset object from the underlying source.

Source

fn read_encrypted(&mut self) -> Result<EncryptedKeyset, TinkError>

Return an EncryptedKeyset object from the underlying source.

Implementors§

Source§

impl Reader for MemReaderWriter

Source§

impl<T: Read> Reader for BinaryReader<T>

Source§

impl<T: Read> Reader for JsonReader<T>

Available on crate feature json only.