pub struct ScriptGroup {
pub script: Script,
pub group_type: ScriptGroupType,
pub input_indices: Vec<usize>,
pub output_indices: Vec<usize>,
}
Expand description
A script group is defined as scripts that share the same hash.
A script group will only be executed once per transaction, the script itself should check against all inputs/outputs in its group if needed.
Fields§
§script: Script
The script.
A script group is a group of input and output cells that share the same script.
group_type: ScriptGroupType
The script group type.
input_indices: Vec<usize>
Indices of input cells.
output_indices: Vec<usize>
Indices of output cells.
Implementations§
Source§impl ScriptGroup
impl ScriptGroup
Sourcepub fn new(script: &Script, group_type: ScriptGroupType) -> Self
pub fn new(script: &Script, group_type: ScriptGroupType) -> Self
Creates a new script group struct.
Sourcepub fn from_lock_script(script: &Script) -> Self
pub fn from_lock_script(script: &Script) -> Self
Creates a lock script group.
Sourcepub fn from_type_script(script: &Script) -> Self
pub fn from_type_script(script: &Script) -> Self
Creates a type script group.
Trait Implementations§
Source§impl Clone for ScriptGroup
impl Clone for ScriptGroup
Source§fn clone(&self) -> ScriptGroup
fn clone(&self) -> ScriptGroup
Returns a copy 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 moreAuto Trait Implementations§
impl !Freeze for ScriptGroup
impl RefUnwindSafe for ScriptGroup
impl Send for ScriptGroup
impl Sync for ScriptGroup
impl Unpin for ScriptGroup
impl UnwindSafe for ScriptGroup
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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