pub struct KeepRaw<'b, T> { /* private fields */ }Expand description
Decodes a struct while preserving original CBOR
§Examples
use pallas_codec::utils::KeepRaw;
let a = (123u16, (456u16, 789u16), 123u16);
let data = minicbor::to_vec(a).unwrap();
let (_, keeper, _): (u16, KeepRaw<(u16, u16)>, u16) = minicbor::decode(&data).unwrap();
let confirm: (u16, u16) = minicbor::decode(keeper.raw_cbor()).unwrap();
assert_eq!(confirm, (456u16, 789u16));Implementations§
Trait Implementations§
Source§impl From<KeepRaw<'_, NativeScript>> for MemoizedNativeScript
impl From<KeepRaw<'_, NativeScript>> for MemoizedNativeScript
Source§fn from(script: KeepRaw<'_, NativeScript>) -> Self
fn from(script: KeepRaw<'_, NativeScript>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<KeepRaw<'a, HeaderBody>> for HeaderBody
impl<'a> From<KeepRaw<'a, HeaderBody>> for HeaderBody
Source§fn from(x: KeepRaw<'a, HeaderBody>) -> HeaderBody
fn from(x: KeepRaw<'a, HeaderBody>) -> HeaderBody
Converts to this type from the input type.
Source§impl<'a> From<KeepRaw<'a, PseudoHeader<KeepRaw<'a, HeaderBody>>>> for PseudoHeader<HeaderBody>
impl<'a> From<KeepRaw<'a, PseudoHeader<KeepRaw<'a, HeaderBody>>>> for PseudoHeader<HeaderBody>
Source§fn from(
x: KeepRaw<'a, PseudoHeader<KeepRaw<'a, HeaderBody>>>,
) -> PseudoHeader<HeaderBody>
fn from( x: KeepRaw<'a, PseudoHeader<KeepRaw<'a, HeaderBody>>>, ) -> PseudoHeader<HeaderBody>
Converts to this type from the input type.
Source§impl<'b> From<KeepRaw<'b, PlutusData>> for MemoizedPlutusData
impl<'b> From<KeepRaw<'b, PlutusData>> for MemoizedPlutusData
Source§fn from(data: KeepRaw<'b, PlutusData>) -> Self
fn from(data: KeepRaw<'b, PlutusData>) -> Self
Converts to this type from the input type.
Source§impl<'b, T> Ord for KeepRaw<'b, T>where
T: Ord,
impl<'b, T> Ord for KeepRaw<'b, T>where
T: Ord,
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 OriginalHash<28> for KeepRaw<'_, NativeScript>
impl OriginalHash<28> for KeepRaw<'_, NativeScript>
fn original_hash(&self) -> Hash<28>
Source§impl OriginalHash<32> for KeepRaw<'_, BlockHead>
impl OriginalHash<32> for KeepRaw<'_, BlockHead>
fn original_hash(&self) -> Hash<32>
Source§impl OriginalHash<32> for KeepRaw<'_, EbbHead>
impl OriginalHash<32> for KeepRaw<'_, EbbHead>
fn original_hash(&self) -> Hash<32>
Source§impl OriginalHash<32> for KeepRaw<'_, KeepRaw<'_, PseudoHeader<KeepRaw<'_, HeaderBody>>>>
impl OriginalHash<32> for KeepRaw<'_, KeepRaw<'_, PseudoHeader<KeepRaw<'_, HeaderBody>>>>
fn original_hash(&self) -> Hash<32>
Source§impl OriginalHash<32> for KeepRaw<'_, KeepRaw<'_, PseudoHeader<KeepRaw<'_, HeaderBody>>>>
impl OriginalHash<32> for KeepRaw<'_, KeepRaw<'_, PseudoHeader<KeepRaw<'_, HeaderBody>>>>
fn original_hash(&self) -> Hash<32>
Source§impl OriginalHash<32> for KeepRaw<'_, PlutusData>
impl OriginalHash<32> for KeepRaw<'_, PlutusData>
fn original_hash(&self) -> Hash<32>
Source§impl OriginalHash<32> for KeepRaw<'_, PseudoHeader<HeaderBody>>
impl OriginalHash<32> for KeepRaw<'_, PseudoHeader<HeaderBody>>
fn original_hash(&self) -> Hash<32>
Source§impl OriginalHash<32> for KeepRaw<'_, PseudoTransactionBody<PseudoTransactionOutput<PseudoPostAlonzoTransactionOutput<Value, PseudoDatumOption<KeepRaw<'_, PlutusData>>, PseudoScript<KeepRaw<'_, NativeScript>>>>>>
impl OriginalHash<32> for KeepRaw<'_, PseudoTransactionBody<PseudoTransactionOutput<PseudoPostAlonzoTransactionOutput<Value, PseudoDatumOption<KeepRaw<'_, PlutusData>>, PseudoScript<KeepRaw<'_, NativeScript>>>>>>
fn original_hash(&self) -> Hash<32>
Source§impl OriginalHash<32> for KeepRaw<'_, PseudoTransactionBody<PseudoTransactionOutput<PseudoPostAlonzoTransactionOutput<Value, PseudoDatumOption<KeepRaw<'_, PlutusData>>, PseudoScript<KeepRaw<'_, NativeScript>>>>>>
impl OriginalHash<32> for KeepRaw<'_, PseudoTransactionBody<PseudoTransactionOutput<PseudoPostAlonzoTransactionOutput<Value, PseudoDatumOption<KeepRaw<'_, PlutusData>>, PseudoScript<KeepRaw<'_, NativeScript>>>>>>
fn original_hash(&self) -> Hash<32>
Source§impl OriginalHash<32> for KeepRaw<'_, PseudoTransactionBody<PseudoTransactionOutput<PseudoPostAlonzoTransactionOutput<Value, PseudoDatumOption<PlutusData>, PseudoScript<NativeScript>>>>>
impl OriginalHash<32> for KeepRaw<'_, PseudoTransactionBody<PseudoTransactionOutput<PseudoPostAlonzoTransactionOutput<Value, PseudoDatumOption<PlutusData>, PseudoScript<NativeScript>>>>>
fn original_hash(&self) -> Hash<32>
Source§impl OriginalHash<32> for KeepRaw<'_, PseudoTransactionBody<PseudoTransactionOutput<PseudoPostAlonzoTransactionOutput<Value, PseudoDatumOption<PlutusData>, PseudoScript<NativeScript>>>>>
impl OriginalHash<32> for KeepRaw<'_, PseudoTransactionBody<PseudoTransactionOutput<PseudoPostAlonzoTransactionOutput<Value, PseudoDatumOption<PlutusData>, PseudoScript<NativeScript>>>>>
fn original_hash(&self) -> Hash<32>
Source§impl OriginalHash<32> for KeepRaw<'_, TransactionBody>
impl OriginalHash<32> for KeepRaw<'_, TransactionBody>
fn original_hash(&self) -> Hash<32>
Source§impl OriginalHash<32> for KeepRaw<'_, Tx>
impl OriginalHash<32> for KeepRaw<'_, Tx>
fn original_hash(&self) -> Hash<32>
Source§impl<'b, T> PartialOrd for KeepRaw<'b, T>where
T: PartialOrd,
impl<'b, T> PartialOrd for KeepRaw<'b, T>where
T: PartialOrd,
impl<'b, T> Eq for KeepRaw<'b, T>where
T: Eq,
impl<'b, T> StructuralPartialEq for KeepRaw<'b, T>
Auto Trait Implementations§
impl<'b, T> Freeze for KeepRaw<'b, T>where
T: Freeze,
impl<'b, T> RefUnwindSafe for KeepRaw<'b, T>where
T: RefUnwindSafe,
impl<'b, T> Send for KeepRaw<'b, T>where
T: Send,
impl<'b, T> Sync for KeepRaw<'b, T>where
T: Sync,
impl<'b, T> Unpin for KeepRaw<'b, T>where
T: Unpin,
impl<'b, T> UnsafeUnpin for KeepRaw<'b, T>where
T: UnsafeUnpin,
impl<'b, T> UnwindSafe for KeepRaw<'b, T>where
T: UnwindSafe,
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<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