Module pod

Source
Expand description

Safecoin program utilities for Plain Old Data types

Structs§

OptionalNonZeroEncryptionPubkey
An EncryptionPubkey that encodes None as all 0, meant to be usable as a Pod type.
OptionalNonZeroPubkey
A Pubkey that encodes None as all 0, meant to be usable as a Pod type, similar to all NonZero* number types from the bytemuck library.
PodBool
The standard bool is not a Pod, define a replacement that is
PodI16
i16 type that can be used in Pods
PodI64
i64 type that can be used in Pods
PodU16
u16 type that can be used in Pods
PodU64
u64 type that can be used in Pods

Functions§

pod_bytes_of
Convert a Pod into a slice (zero copy)
pod_from_bytes
Convert a slice into a Pod (zero copy)
pod_from_bytes_mut
Convert a slice into a mutable Pod (zero copy)
pod_get_packed_len
On-chain size of a Pod type
pod_maybe_from_bytes
Maybe convert a slice into a Pod (zero copy)

Type Aliases§

EncryptionPubkey
ElGamal public key used for encryption