Trait single_use_seals::CloseSeal
source · pub trait CloseSeal<Seal>: SealProtocol<Seal> {
// Required methods
fn close_seal(
&mut self,
seal: &Seal,
over: &Self::Message
) -> Result<Self::Witness, Self::Error>;
fn close_all_seals<'seal>(
&mut self,
seals: impl IntoIterator<Item = &'seal Seal>,
over: &Self::Message
) -> Result<Self::Witness, Self::Error>
where Seal: 'seal;
}
Expand description
Adds support for the seal close operation to SealProtocol
.
Required Methods§
sourcefn close_seal(
&mut self,
seal: &Seal,
over: &Self::Message
) -> Result<Self::Witness, Self::Error>
fn close_seal( &mut self, seal: &Seal, over: &Self::Message ) -> Result<Self::Witness, Self::Error>
Closes seal over a message, producing witness.
NB: Closing of the seal MUST not change the internal state of the seal itself; all the data produced by the process must be placed into the returned Witness type.
The witness is not published by this method to the seal medium.
sourcefn close_all_seals<'seal>(
&mut self,
seals: impl IntoIterator<Item = &'seal Seal>,
over: &Self::Message
) -> Result<Self::Witness, Self::Error>where
Seal: 'seal,
fn close_all_seals<'seal>(
&mut self,
seals: impl IntoIterator<Item = &'seal Seal>,
over: &Self::Message
) -> Result<Self::Witness, Self::Error>where
Seal: 'seal,
Closes number of related seals over the same message, producing a single witness.
NB: Closing of the seal MUST not change the internal state of the seal itself; all the data produced by the process must be placed into the returned Witness type.
The witness is not published by this method to the seal medium.
Object Safety§
This trait is not object safe.