Struct ckb_sdk::traits::CellQueryOptions
source · pub struct CellQueryOptions {
pub primary_script: Script,
pub primary_type: PrimaryScriptType,
pub with_data: Option<bool>,
pub secondary_script: Option<Script>,
pub secondary_script_len_range: Option<ValueRangeOption>,
pub data_len_range: Option<ValueRangeOption>,
pub capacity_range: Option<ValueRangeOption>,
pub block_range: Option<ValueRangeOption>,
pub order: QueryOrder,
pub limit: Option<u32>,
pub maturity: MaturityOption,
pub min_total_capacity: u64,
}Fields§
§primary_script: Script§primary_type: PrimaryScriptType§with_data: Option<bool>§secondary_script: Option<Script>§secondary_script_len_range: Option<ValueRangeOption>§data_len_range: Option<ValueRangeOption>§capacity_range: Option<ValueRangeOption>§block_range: Option<ValueRangeOption>§order: QueryOrder§limit: Option<u32>§maturity: MaturityOptionFilter cell by its maturity
min_total_capacity: u64Try to collect at least min_total_capacity shannons of cells, if
satisfied will stop collecting. The default value is 1 shannon means
collect only one cell at most.
Implementations§
source§impl CellQueryOptions
impl CellQueryOptions
pub fn new(
primary_script: Script,
primary_type: PrimaryScriptType
) -> CellQueryOptions
pub fn new_lock(primary_script: Script) -> CellQueryOptions
pub fn new_type(primary_script: Script) -> CellQueryOptions
pub fn match_cell(&self, cell: &LiveCell, max_mature_number: u64) -> bool
Trait Implementations§
source§impl Clone for CellQueryOptions
impl Clone for CellQueryOptions
source§fn clone(&self) -> CellQueryOptions
fn clone(&self) -> CellQueryOptions
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 moresource§impl Debug for CellQueryOptions
impl Debug for CellQueryOptions
source§impl From<CellQueryOptions> for SearchKey
impl From<CellQueryOptions> for SearchKey
source§fn from(opts: CellQueryOptions) -> SearchKey
fn from(opts: CellQueryOptions) -> SearchKey
Converts to this type from the input type.
source§impl Hash for CellQueryOptions
impl Hash for CellQueryOptions
source§impl PartialEq<CellQueryOptions> for CellQueryOptions
impl PartialEq<CellQueryOptions> for CellQueryOptions
source§fn eq(&self, other: &CellQueryOptions) -> bool
fn eq(&self, other: &CellQueryOptions) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for CellQueryOptions
impl StructuralEq for CellQueryOptions
impl StructuralPartialEq for CellQueryOptions
Auto Trait Implementations§
impl RefUnwindSafe for CellQueryOptions
impl Send for CellQueryOptions
impl Sync for CellQueryOptions
impl Unpin for CellQueryOptions
impl UnwindSafe for CellQueryOptions
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.