pub struct SgData<DL> {
pub rtx: Arc<ResolvedTransaction>,
pub tx_info: Arc<TxInfo<DL>>,
pub sg_info: Arc<SgInfo>,
}
Expand description
Immutable context data at script group level
Fields§
§rtx: Arc<ResolvedTransaction>
ResolvedTransaction.
tx_info: Arc<TxInfo<DL>>
Passed & derived information at transaction level.
sg_info: Arc<SgInfo>
Passed & derived information at script group level.
Implementations§
Source§impl<DL> SgData<DL>
impl<DL> SgData<DL>
Sourcepub fn new(
tx_data: &TxData<DL>,
script_group: &ScriptGroup,
) -> Result<Self, ScriptError>
pub fn new( tx_data: &TxData<DL>, script_group: &ScriptGroup, ) -> Result<Self, ScriptError>
Creates a new SgData structure from TxData, and script group information
Sourcepub fn data_loader(&self) -> &DL
pub fn data_loader(&self) -> &DL
Shortcut to data loader
Sourcepub fn group_inputs(&self) -> &[usize]
pub fn group_inputs(&self) -> &[usize]
Shortcut to group input indices
Sourcepub fn group_outputs(&self) -> &[usize]
pub fn group_outputs(&self) -> &[usize]
Shortcut to group output indices
Trait Implementations§
Source§impl<DL> DataSource<DataPieceId> for SgData<DL>where
DL: CellDataProvider,
impl<DL> DataSource<DataPieceId> for SgData<DL>where
DL: CellDataProvider,
Auto Trait Implementations§
impl<DL> Freeze for SgData<DL>
impl<DL> RefUnwindSafe for SgData<DL>where
DL: RefUnwindSafe,
impl<DL> Send for SgData<DL>
impl<DL> Sync for SgData<DL>
impl<DL> Unpin for SgData<DL>
impl<DL> UnwindSafe for SgData<DL>where
DL: RefUnwindSafe,
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more