Struct cardano_serialization_lib::DRep
source · pub struct DRep(_);
Implementations§
source§impl DRep
impl DRep
pub fn from_bytes(bytes: Vec<u8>) -> Result<DRep, DeserializeError>
source§impl DRep
impl DRep
pub fn new_key_hash(key_hash: &Ed25519KeyHash) -> Self
pub fn new_script_hash(script_hash: &ScriptHash) -> Self
pub fn new_always_abstain() -> Self
pub fn new_always_no_confidence() -> Self
pub fn kind(&self) -> DRepKind
pub fn to_key_hash(&self) -> Option<Ed25519KeyHash>
pub fn to_script_hash(&self) -> Option<ScriptHash>
Trait Implementations§
source§impl<'de> Deserialize<'de> for DRep
impl<'de> Deserialize<'de> for DRep
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 JsonSchema for DRep
impl JsonSchema for DRep
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &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 DRep
impl Ord for DRep
source§impl PartialEq<DRep> for DRep
impl PartialEq<DRep> for DRep
source§impl PartialOrd<DRep> for DRep
impl PartialOrd<DRep> for DRep
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for DRep
impl Serialize for DRep
fn serialize<'se, W: Write>( &self, serializer: &'se mut Serializer<W> ) -> Result<&'se mut Serializer<W>>
impl Eq for DRep
impl StructuralEq for DRep
impl StructuralPartialEq for DRep
Auto Trait Implementations§
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