pub struct Nip44Payload { /* private fields */ }Expand description
One bounded, encoded NIP-44 v2 payload.
Implementations§
Source§impl Nip44Payload
impl Nip44Payload
Sourcepub fn from_encoded(encoded: impl Into<String>) -> Result<Self, SoftchatError>
pub fn from_encoded(encoded: impl Into<String>) -> Result<Self, SoftchatError>
Retain an encoded payload after applying the cheap resource bound.
Authentication, base64, padding, and version validation intentionally remain part of decryption so they map to one redacted failure.
§Errors
Returns SoftchatError::CiphertextTooLarge when the encoded value
exceeds the current Softchat bound.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consume the value and return its encoded representation.
Trait Implementations§
Source§impl Clone for Nip44Payload
impl Clone for Nip44Payload
Source§fn clone(&self) -> Nip44Payload
fn clone(&self) -> Nip44Payload
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Nip44Payload
impl Debug for Nip44Payload
Source§impl Hash for Nip44Payload
impl Hash for Nip44Payload
Source§impl PartialEq for Nip44Payload
impl PartialEq for Nip44Payload
Source§fn eq(&self, other: &Nip44Payload) -> bool
fn eq(&self, other: &Nip44Payload) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for Nip44Payload
impl StructuralPartialEq for Nip44Payload
Auto Trait Implementations§
impl Freeze for Nip44Payload
impl RefUnwindSafe for Nip44Payload
impl Send for Nip44Payload
impl Sync for Nip44Payload
impl Unpin for Nip44Payload
impl UnsafeUnpin for Nip44Payload
impl UnwindSafe for Nip44Payload
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<> Read more