Struct cml_chain_wasm::certs::DRep
source · pub struct DRep(/* private fields */);Implementations§
source§impl DRep
impl DRep
sourcepub fn to_cbor_bytes(&self) -> Vec<u8> ⓘ
pub fn to_cbor_bytes(&self) -> Vec<u8> ⓘ
- Serialize this type to CBOR bytes
- This type type supports encoding preservation so this will preserve round-trip CBOR formats.
- If created from scratch the CBOR will be canonical.
sourcepub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<DRep, JsError>
pub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<DRep, JsError>
- Create this type from CBOR bytes
sourcepub fn to_cbor_hex(&self) -> String
pub fn to_cbor_hex(&self) -> String
- Serialize this type to CBOR bytes encoded as a hex string (useful for working with CIP30).
- This type type supports encoding preservation so this will preserve round-trip CBOR formats.
- If created from scratch the CBOR will be canonical.
source§impl DRep
impl DRep
pub fn new_key(pool: &Ed25519KeyHash) -> Self
pub fn new_script(script_hash: &ScriptHash) -> Self
pub fn new_always_abstain() -> Self
pub fn new_always_no_confidence() -> Self
pub fn kind(&self) -> DRepKind
pub fn as_key(&self) -> Option<Ed25519KeyHash>
pub fn as_script(&self) -> Option<ScriptHash>
Trait Implementations§
source§impl FromWasmAbi for DRep
impl FromWasmAbi for DRep
source§impl IntoWasmAbi for DRep
impl IntoWasmAbi for DRep
source§impl OptionFromWasmAbi for DRep
impl OptionFromWasmAbi for DRep
source§impl OptionIntoWasmAbi for DRep
impl OptionIntoWasmAbi for DRep
source§impl RefFromWasmAbi for DRep
impl RefFromWasmAbi for DRep
source§impl RefMutFromWasmAbi for DRep
impl RefMutFromWasmAbi for DRep
Auto Trait Implementations§
impl Freeze for DRep
impl RefUnwindSafe for DRep
impl Send for DRep
impl Sync for DRep
impl Unpin for DRep
impl UnwindSafe for DRep
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> 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 moresource§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abisource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.