Struct tink_core::keyset::JsonWriter
source · [−]pub struct JsonWriter<T: Write> { /* private fields */ }
This is supported on crate feature
json
only.Expand description
JsonWriter
serializes a keyset into JSON format.
Implementations
sourceimpl<T: Write> JsonWriter<T>
impl<T: Write> JsonWriter<T>
sourcepub fn new(w: T) -> Self
pub fn new(w: T) -> Self
Return a new JsonWriter
that will write to w
.
Trait Implementations
sourceimpl<T: Write> Writer for JsonWriter<T>
impl<T: Write> Writer for JsonWriter<T>
sourcefn write(&mut self, keyset: &Keyset) -> Result<(), TinkError>
fn write(&mut self, keyset: &Keyset) -> Result<(), TinkError>
Write the keyset to the underlying std::io::Write
.
sourcefn write_encrypted(&mut self, keyset: &EncryptedKeyset) -> Result<(), TinkError>
fn write_encrypted(&mut self, keyset: &EncryptedKeyset) -> Result<(), TinkError>
Write the encrypted keyset to the underlying std::io::Write
.
Auto Trait Implementations
impl<T> RefUnwindSafe for JsonWriter<T> where
T: RefUnwindSafe,
impl<T> Send for JsonWriter<T> where
T: Send,
impl<T> Sync for JsonWriter<T> where
T: Sync,
impl<T> Unpin for JsonWriter<T> where
T: Unpin,
impl<T> UnwindSafe for JsonWriter<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more