pub struct CommitmentConfig(/* private fields */);
Expand description
Wrapper object for CommitmentLevel
.
Args: commitment (CommitmentLevel): Bank state to query.
Implementations§
source§impl CommitmentConfig
impl CommitmentConfig
pub fn new(commitment: CommitmentLevel) -> Self
pub fn commitment(&self) -> CommitmentLevel
sourcepub fn new_from_str(s: &str) -> PyResult<Self>
pub fn new_from_str(s: &str) -> PyResult<Self>
Create from a string.
sourcepub fn new_default() -> Self
pub fn new_default() -> Self
Create a new default instance.
sourcepub fn is_finalized(&self) -> bool
pub fn is_finalized(&self) -> bool
Check if using finalized
commitment.
sourcepub fn is_confirmed(&self) -> bool
pub fn is_confirmed(&self) -> bool
Check if using confirmed
commitment.
sourcepub fn is_at_least_confirmed(&self) -> bool
pub fn is_at_least_confirmed(&self) -> bool
Check if using at least confirmed
commitment.
Trait Implementations§
source§impl Clone for CommitmentConfig
impl Clone for CommitmentConfig
source§fn clone(&self) -> CommitmentConfig
fn clone(&self) -> CommitmentConfig
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 CommitmentConfig
impl Debug for CommitmentConfig
source§impl Default for CommitmentConfig
impl Default for CommitmentConfig
source§fn default() -> CommitmentConfig
fn default() -> CommitmentConfig
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for CommitmentConfig
impl<'de> Deserialize<'de> for CommitmentConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<CommitmentConfig> for CommitmentConfig
impl From<CommitmentConfig> for CommitmentConfig
source§fn from(original: CommitmentConfig) -> Self
fn from(original: CommitmentConfig) -> Self
Converts to this type from the input type.
source§impl From<CommitmentConfig> for CommitmentConfig
impl From<CommitmentConfig> for CommitmentConfig
source§fn from(original: CommitmentConfigOriginal) -> CommitmentConfig
fn from(original: CommitmentConfigOriginal) -> CommitmentConfig
Converts to this type from the input type.
source§impl From<CommitmentConfig> for CommitmentLevel
impl From<CommitmentConfig> for CommitmentLevel
source§fn from(c: CommitmentConfig) -> Self
fn from(c: CommitmentConfig) -> Self
Converts to this type from the input type.
source§impl From<CommitmentLevel> for CommitmentConfig
impl From<CommitmentLevel> for CommitmentConfig
source§fn from(c: CommitmentLevelOriginal) -> Self
fn from(c: CommitmentLevelOriginal) -> Self
Converts to this type from the input type.
source§impl From<CommitmentLevel> for CommitmentConfig
impl From<CommitmentLevel> for CommitmentConfig
source§fn from(c: CommitmentLevel) -> Self
fn from(c: CommitmentLevel) -> Self
Converts to this type from the input type.
source§impl Hash for CommitmentConfig
impl Hash for CommitmentConfig
source§impl PartialEq for CommitmentConfig
impl PartialEq for CommitmentConfig
source§fn eq(&self, other: &CommitmentConfig) -> bool
fn eq(&self, other: &CommitmentConfig) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PyClass for CommitmentConfig
impl PyClass for CommitmentConfig
source§impl PyClassImpl for CommitmentConfig
impl PyClassImpl for CommitmentConfig
source§const IS_BASETYPE: bool = true
const IS_BASETYPE: bool = true
#[pyclass(subclass)]
source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
#[pyclass(extends=…)]
source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
#[pyclass(mapping)]
source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
#[pyclass(sequence)]
§type Layout = PyCell<CommitmentConfig>
type Layout = PyCell<CommitmentConfig>
Layout
§type ThreadChecker = ThreadCheckerStub<CommitmentConfig>
type ThreadChecker = ThreadCheckerStub<CommitmentConfig>
This handles following two situations: Read more
§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Immutable or mutable
§type BaseNativeType = PyAny
type BaseNativeType = PyAny
The closest native ancestor. This is
PyAny
by default, and when you declare
#[pyclass(extends=PyDict)]
, it’s PyDict
.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
source§impl PyClassNewTextSignature<CommitmentConfig> for PyClassImplCollector<CommitmentConfig>
impl PyClassNewTextSignature<CommitmentConfig> for PyClassImplCollector<CommitmentConfig>
fn new_text_signature(self) -> Option<&'static str>
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a CommitmentConfig
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a CommitmentConfig
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut CommitmentConfig
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut CommitmentConfig
source§impl PyMethods<CommitmentConfig> for PyClassImplCollector<CommitmentConfig>
impl PyMethods<CommitmentConfig> for PyClassImplCollector<CommitmentConfig>
fn py_methods(self) -> &'static PyClassItems
source§impl PyTypeInfo for CommitmentConfig
impl PyTypeInfo for CommitmentConfig
§type AsRefTarget = PyCell<CommitmentConfig>
type AsRefTarget = PyCell<CommitmentConfig>
Utility type to make Py::as_ref work.
source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Returns the PyTypeObject instance for this type.
source§fn type_object(py: Python<'_>) -> &PyType
fn type_object(py: Python<'_>) -> &PyType
Returns the safe abstraction over the type object.
source§fn is_type_of(object: &PyAny) -> bool
fn is_type_of(object: &PyAny) -> bool
Checks if
object
is an instance of this type or a subclass of this type.source§fn is_exact_type_of(object: &PyAny) -> bool
fn is_exact_type_of(object: &PyAny) -> bool
Checks if
object
is an instance of this type.source§impl Serialize for CommitmentConfig
impl Serialize for CommitmentConfig
impl Copy for CommitmentConfig
impl Eq for CommitmentConfig
impl StructuralEq for CommitmentConfig
impl StructuralPartialEq for CommitmentConfig
Auto Trait Implementations§
impl RefUnwindSafe for CommitmentConfig
impl Send for CommitmentConfig
impl Sync for CommitmentConfig
impl Unpin for CommitmentConfig
impl UnwindSafe for CommitmentConfig
Blanket Implementations§
§impl<T> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
default fn visit_for_abi( &self, digester: &mut AbiDigester ) -> Result<AbiDigester, DigestError>
§impl<T> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
default fn visit_for_abi( &self, _digester: &mut AbiDigester ) -> Result<AbiDigester, DigestError>
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more