Expand description
A correctly signed object of type T
.
The correctness is guaranteed by storing a (phantom) reference to the KeyBox
that verified
the signature.
Implementations
impl<'a, T, KB> Signed<'a, T, KB> where
T: Signable + Index,
KB: KeyBox,
impl<'a, T, KB> Signed<'a, T, KB> where
T: Signable + Index,
KB: KeyBox,
pub async fn sign(signable: T, key_box: &'a KB) -> Signed<'a, T, KB>
pub async fn sign(signable: T, key_box: &'a KB) -> Signed<'a, T, KB>
Create a signed object from a signable. The index of signable
must match the index of the key_box
.
pub fn as_signable(&self) -> &T
pub fn as_signable(&self) -> &T
Get a reference to the signed object.
pub fn into_signable(self) -> T
pub fn into_unchecked(self) -> UncheckedSigned<T, <KB as KeyBox>::Signature>
impl<'a, T, KB> Signed<'a, Indexed<T>, KB> where
T: Signable,
KB: KeyBox,
impl<'a, T, KB> Signed<'a, Indexed<T>, KB> where
T: Signable,
KB: KeyBox,
pub async fn sign_with_index(
signable: T,
key_box: &'a KB
) -> Signed<'a, Indexed<T>, KB>
pub async fn sign_with_index(
signable: T,
key_box: &'a KB
) -> Signed<'a, Indexed<T>, KB>
Create a signed object from a signable. The index is added based on the index of the key_box
.
impl<'a, T, MK> Signed<'a, Indexed<T>, MK> where
T: Signable,
MK: MultiKeychain,
impl<'a, T, MK> Signed<'a, Indexed<T>, MK> where
T: Signable,
MK: MultiKeychain,
pub fn into_partially_multisigned(
self,
keychain: &'a MK
) -> PartiallyMultisigned<'a, T, MK>
pub fn into_partially_multisigned(
self,
keychain: &'a MK
) -> PartiallyMultisigned<'a, T, MK>
Transform a singly signed object into a partially multisigned consisting of just the signed object. Note that depending on the setup, it may yield a complete signature.
Trait Implementations
Auto Trait Implementations
impl<'a, T, KB> RefUnwindSafe for Signed<'a, T, KB> where
KB: RefUnwindSafe,
T: RefUnwindSafe,
<KB as KeyBox>::Signature: RefUnwindSafe,
impl<'a, T, KB> Send for Signed<'a, T, KB> where
T: Send,
impl<'a, T, KB> Sync for Signed<'a, T, KB> where
T: Sync,
impl<'a, T, KB> Unpin for Signed<'a, T, KB> where
T: Unpin,
<KB as KeyBox>::Signature: Unpin,
impl<'a, T, KB> UnwindSafe for Signed<'a, T, KB> where
KB: RefUnwindSafe,
T: UnwindSafe,
<KB as KeyBox>::Signature: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more