[][src]Struct grin_wallet_libwallet::Slatepack

pub struct Slatepack {
    pub slatepack: SlatepackVersion,
    pub mode: u8,
    pub sender: Option<SlatepackAddress>,
    pub payload: Vec<u8>,
    pub future_test_mode: bool,
    // some fields omitted
}

Basic Slatepack definition

Fields

slatepack: SlatepackVersion

Versioning info

mode: u8

Delivery Mode, 0 = plain_text, 1 = age encrypted

sender: Option<SlatepackAddress>

Optional Sender address

payload: Vec<u8>

Binary payload, can be encrypted or plaintext

future_test_mode: bool

Test mode

Implementations

impl Slatepack[src]

pub fn opt_fields_len(&self) -> Result<usize, Error>[src]

return length of optional fields

pub fn try_encrypt_payload(
    &mut self,
    recipients: Vec<SlatepackAddress>
) -> Result<(), Error>
[src]

age encrypt the payload with the given public key

pub fn try_decrypt_payload(
    &mut self,
    dec_key: Option<&edSecretKey>
) -> Result<(), Error>
[src]

As above, decrypt if needed

pub fn add_recipient(&mut self, address: SlatepackAddress)[src]

add a recipient to encrypted metadata

pub fn recipients(&self) -> &Vec<SlatepackAddress>[src]

retrieve recipients

pub fn ver_check_warn(&self)[src]

version check warning

Trait Implementations

impl Clone for Slatepack[src]

impl Debug for Slatepack[src]

impl Default for Slatepack[src]

impl<'de> Deserialize<'de> for Slatepack[src]

impl Display for Slatepack[src]

impl Eq for Slatepack[src]

impl PartialEq<Slatepack> for Slatepack[src]

impl Serialize for Slatepack[src]

impl StructuralEq for Slatepack[src]

impl StructuralPartialEq for Slatepack[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized

impl<T> CloneAny for T where
    T: Clone + Any

impl<T> DebugAny for T where
    T: Any + Debug

impl<'a, T> DefaultFeatures<'a> for T where
    T: 'a + Clone + Send + Sync

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> InitializableFromZeroed for T where
    T: Default

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<'a, T> NonSyncFeatures<'a> for T where
    T: 'a + Clone

impl<T> SafeBorrow<T> for T where
    T: ?Sized

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> UnsafeAny for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,