pub trait SecretBinary {
// Required methods
fn secret_read_from<T: Read>(reader: &mut T) -> Self;
fn secret_write_to<T: Write>(&self, writer: &mut T) -> Result<()>;
}
Expand description
Required for secret-shared values. Secret variables are serialized like their public counterparts using the State serialization format.
Required Methods§
sourcefn secret_read_from<T: Read>(reader: &mut T) -> Self
fn secret_read_from<T: Read>(reader: &mut T) -> Self
Deserialization method for a secret.
Object Safety§
Implementations on Foreign Types§
source§impl SecretBinary for i8
impl SecretBinary for i8
Implementation of the SecretBinary
trait for i8
.
fn secret_read_from<ReadT: Read>(reader: &mut ReadT) -> Self
fn secret_write_to<WriteT: Write>(&self, writer: &mut WriteT) -> Result<()>
source§impl SecretBinary for i16
impl SecretBinary for i16
Implementation of the SecretBinary
trait for i16
.
fn secret_read_from<ReadT: Read>(reader: &mut ReadT) -> Self
fn secret_write_to<WriteT: Write>(&self, writer: &mut WriteT) -> Result<()>
source§impl SecretBinary for i32
impl SecretBinary for i32
Implementation of the SecretBinary
trait for i32
.
fn secret_read_from<ReadT: Read>(reader: &mut ReadT) -> Self
fn secret_write_to<WriteT: Write>(&self, writer: &mut WriteT) -> Result<()>
source§impl SecretBinary for i64
impl SecretBinary for i64
Implementation of the SecretBinary
trait for i64
.
fn secret_read_from<ReadT: Read>(reader: &mut ReadT) -> Self
fn secret_write_to<WriteT: Write>(&self, writer: &mut WriteT) -> Result<()>
source§impl SecretBinary for i128
impl SecretBinary for i128
Implementation of the SecretBinary
trait for i128
.
fn secret_read_from<ReadT: Read>(reader: &mut ReadT) -> Self
fn secret_write_to<WriteT: Write>(&self, writer: &mut WriteT) -> Result<()>
source§impl SecretBinary for u8
impl SecretBinary for u8
Implementation of the SecretBinary
trait for u8
.
fn secret_read_from<ReadT: Read>(reader: &mut ReadT) -> Self
fn secret_write_to<WriteT: Write>(&self, writer: &mut WriteT) -> Result<()>
source§impl SecretBinary for u16
impl SecretBinary for u16
Implementation of the SecretBinary
trait for u16
.
fn secret_read_from<ReadT: Read>(reader: &mut ReadT) -> Self
fn secret_write_to<WriteT: Write>(&self, writer: &mut WriteT) -> Result<()>
source§impl SecretBinary for u32
impl SecretBinary for u32
Implementation of the SecretBinary
trait for u32
.
fn secret_read_from<ReadT: Read>(reader: &mut ReadT) -> Self
fn secret_write_to<WriteT: Write>(&self, writer: &mut WriteT) -> Result<()>
source§impl SecretBinary for u64
impl SecretBinary for u64
Implementation of the SecretBinary
trait for u64
.
fn secret_read_from<ReadT: Read>(reader: &mut ReadT) -> Self
fn secret_write_to<WriteT: Write>(&self, writer: &mut WriteT) -> Result<()>
source§impl SecretBinary for u128
impl SecretBinary for u128
Implementation of the SecretBinary
trait for u128
.
fn secret_read_from<ReadT: Read>(reader: &mut ReadT) -> Self
fn secret_write_to<WriteT: Write>(&self, writer: &mut WriteT) -> Result<()>
source§impl SecretBinary for Vec<Sbi8>
impl SecretBinary for Vec<Sbi8>
source§impl SecretBinary for Vec<Sbu8>
impl SecretBinary for Vec<Sbu8>
source§impl<const LEN: usize, ElementT: SecretBinary + Sized> SecretBinary for [ElementT; LEN]
impl<const LEN: usize, ElementT: SecretBinary + Sized> SecretBinary for [ElementT; LEN]
Implementation of SecretBinary
for arrays of arbitrary sizes and types.
Implementors§
impl SecretBinary for Sbi<i8>
Implementation of SecretBinary
trait for Sbi<i8>
. Encoded as a little-endian integer.
impl SecretBinary for Sbi<i16>
Implementation of SecretBinary
trait for Sbi<i16>
. Encoded as a little-endian integer.
impl SecretBinary for Sbi<i32>
Implementation of SecretBinary
trait for Sbi<i32>
. Encoded as a little-endian integer.
impl SecretBinary for Sbi<i64>
Implementation of SecretBinary
trait for Sbi<i64>
. Encoded as a little-endian integer.
impl SecretBinary for Sbi<i128>
Implementation of SecretBinary
trait for Sbi<i128>
. Encoded as a little-endian integer.
impl SecretBinary for Sbi<u8>
Implementation of SecretBinary
trait for Sbi<u8>
. Encoded as a little-endian integer.
impl SecretBinary for Sbi<u16>
Implementation of SecretBinary
trait for Sbi<u16>
. Encoded as a little-endian integer.
impl SecretBinary for Sbi<u32>
Implementation of SecretBinary
trait for Sbi<u32>
. Encoded as a little-endian integer.
impl SecretBinary for Sbi<u64>
Implementation of SecretBinary
trait for Sbi<u64>
. Encoded as a little-endian integer.
impl SecretBinary for Sbi<u128>
Implementation of SecretBinary
trait for Sbi<u128>
. Encoded as a little-endian integer.
impl SecretBinary for Sbu1
Implementation of SecretBinary
trait for Sbu1
. Uses a full byte to present a single bit.