pub struct DecodedDisclosure<'a> {
pub encoded: Cow<'a, Disclosure>,
pub salt: String,
pub desc: DisclosureDescription,
}Expand description
Decoded disclosure.
Fields§
§encoded: Cow<'a, Disclosure>Encoded disclosure.
salt: StringSalt.
desc: DisclosureDescriptionDisclosure description.
Implementations§
Source§impl<'a> DecodedDisclosure<'a>
impl<'a> DecodedDisclosure<'a>
Sourcepub fn new(
encoded: &'a (impl ?Sized + AsRef<[u8]>),
) -> Result<Self, DecodeError>
pub fn new( encoded: &'a (impl ?Sized + AsRef<[u8]>), ) -> Result<Self, DecodeError>
Decodes the given encoded disclosure.
Sourcepub fn from_parts(salt: String, kind: DisclosureDescription) -> Self
pub fn from_parts(salt: String, kind: DisclosureDescription) -> Self
Creates a decoded disclosure from its parts.
The parts will be automatically encoded to populate the encoded
field.
Sourcepub fn into_owned(self) -> DecodedDisclosure<'static>
pub fn into_owned(self) -> DecodedDisclosure<'static>
Clones the encoded disclosure to fully owned the decoded disclosure.
Trait Implementations§
Source§impl<'a> Clone for DecodedDisclosure<'a>
impl<'a> Clone for DecodedDisclosure<'a>
Source§fn clone(&self) -> DecodedDisclosure<'a>
fn clone(&self) -> DecodedDisclosure<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for DecodedDisclosure<'a>
impl<'a> Debug for DecodedDisclosure<'a>
Source§impl<'a> PartialEq for DecodedDisclosure<'a>
impl<'a> PartialEq for DecodedDisclosure<'a>
impl<'a> StructuralPartialEq for DecodedDisclosure<'a>
Auto Trait Implementations§
impl<'a> Freeze for DecodedDisclosure<'a>
impl<'a> RefUnwindSafe for DecodedDisclosure<'a>
impl<'a> Send for DecodedDisclosure<'a>
impl<'a> Sync for DecodedDisclosure<'a>
impl<'a> Unpin for DecodedDisclosure<'a>
impl<'a> UnwindSafe for DecodedDisclosure<'a>
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> BorrowUnordered for T
impl<T> BorrowUnordered for T
fn as_unordered(&self) -> &Unordered<T>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
Source§impl<T> ResourceProvider<()> for T
impl<T> ResourceProvider<()> for T
Source§fn get_resource(&self) -> &()
fn get_resource(&self) -> &()
Returns a reference to the resource of type
T.