pub struct NativeScript(/* private fields */);
Implementations§
Source§impl NativeScript
impl NativeScript
pub fn from_bytes(bytes: Vec<u8>) -> Result<NativeScript, DeserializeError>
Source§impl NativeScript
impl NativeScript
pub fn from_hex(hex_str: &str) -> Result<NativeScript, DeserializeError>
Source§impl NativeScript
impl NativeScript
Source§impl NativeScript
impl NativeScript
pub fn hash(&self) -> ScriptHash
pub fn new_script_pubkey(script_pubkey: &ScriptPubkey) -> Self
pub fn new_script_all(script_all: &ScriptAll) -> Self
pub fn new_script_any(script_any: &ScriptAny) -> Self
pub fn new_script_n_of_k(script_n_of_k: &ScriptNOfK) -> Self
pub fn new_timelock_start(timelock_start: &TimelockStart) -> Self
pub fn new_timelock_expiry(timelock_expiry: &TimelockExpiry) -> Self
pub fn kind(&self) -> NativeScriptKind
pub fn as_script_pubkey(&self) -> Option<ScriptPubkey>
pub fn as_script_all(&self) -> Option<ScriptAll>
pub fn as_script_any(&self) -> Option<ScriptAny>
pub fn as_script_n_of_k(&self) -> Option<ScriptNOfK>
pub fn as_timelock_start(&self) -> Option<TimelockStart>
pub fn as_timelock_expiry(&self) -> Option<TimelockExpiry>
Sourcepub fn get_required_signers(&self) -> Ed25519KeyHashes
pub fn get_required_signers(&self) -> Ed25519KeyHashes
Returns a set of Ed25519KeyHashes contained within this script recursively on any depth level. The order of the keys in the result is not determined in any way.
Trait Implementations§
Source§impl Clone for NativeScript
impl Clone for NativeScript
Source§fn clone(&self) -> NativeScript
fn clone(&self) -> NativeScript
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 NativeScript
impl Debug for NativeScript
Source§impl<'de> Deserialize<'de> for NativeScript
impl<'de> Deserialize<'de> for NativeScript
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<&NativeScript> for Ed25519KeyHashes
impl From<&NativeScript> for Ed25519KeyHashes
Source§fn from(script: &NativeScript) -> Self
fn from(script: &NativeScript) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for NativeScript
impl JsonSchema for NativeScript
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreSource§impl Ord for NativeScript
impl Ord for NativeScript
Source§fn cmp(&self, other: &NativeScript) -> Ordering
fn cmp(&self, other: &NativeScript) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for NativeScript
impl PartialEq for NativeScript
Source§impl PartialOrd for NativeScript
impl PartialOrd for NativeScript
Source§impl Serialize for NativeScript
impl Serialize for NativeScript
Source§impl Serialize for NativeScript
impl Serialize for NativeScript
fn serialize<'se, W: Write>( &self, serializer: &'se mut Serializer<W>, ) -> Result<&'se mut Serializer<W>>
impl Eq for NativeScript
impl StructuralPartialEq for NativeScript
Auto Trait Implementations§
impl Freeze for NativeScript
impl RefUnwindSafe for NativeScript
impl Send for NativeScript
impl Sync for NativeScript
impl Unpin for NativeScript
impl UnwindSafe for NativeScript
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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