pub struct State<P>where
P: StateProvider,{ /* private fields */ }Implementations§
Source§impl<P> State<P>where
P: StateProvider,
impl<P> State<P>where
P: StateProvider,
pub fn contract_state( &self, contract_id: ContractId, ) -> Result<<P as StateReadProvider>::ContractRead<'_>, StateError<P>>
pub fn select_valid_witness( &self, witness_ids: impl IntoIterator<Item = impl Borrow<Txid>>, ) -> Result<(Txid, WitnessOrd), StateError<P>>
pub fn update_from_bundle<WP>(
&mut self,
contract_id: ContractId,
bundle: &TransitionBundle,
witness_id: Txid,
witness_ord_provider: &WP,
) -> Result<(), StateError<P>>where
WP: WitnessOrdProvider,
pub fn update_from_consignment<R>(
&mut self,
consignment: impl ConsignmentExt,
resolver: R,
) -> Result<(), StateError<P>>where
R: ResolveWitness,
pub fn upsert_witness( &mut self, witness_id: Txid, witness_ord: WitnessOrd, ) -> Result<(), StateError<P>>
pub fn update_bundle( &mut self, bundle_id: BundleId, valid: bool, ) -> Result<(), StateError<P>>
Trait Implementations§
Source§impl<P> CloneNoPersistence for State<P>where
P: StateProvider,
impl<P> CloneNoPersistence for State<P>where
P: StateProvider,
fn clone_no_persistence(&self) -> State<P>
Source§impl<P> StoreTransaction for State<P>where
P: StateProvider,
impl<P> StoreTransaction for State<P>where
P: StateProvider,
type TransactionErr = StateError<P>
fn begin_transaction( &mut self, ) -> Result<(), <State<P> as StoreTransaction>::TransactionErr>
fn commit_transaction( &mut self, ) -> Result<(), <State<P> as StoreTransaction>::TransactionErr>
fn rollback_transaction(&mut self)
Auto Trait Implementations§
impl<P> Freeze for State<P>where
P: Freeze,
impl<P> RefUnwindSafe for State<P>where
P: RefUnwindSafe,
impl<P> Send for State<P>where
P: Send,
impl<P> Sync for State<P>where
P: Sync,
impl<P> Unpin for State<P>where
P: Unpin,
impl<P> UnwindSafe for State<P>where
P: UnwindSafe,
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