pub enum Value<'a> {
Bytes(&'a [u8]),
HDKey(HDKeyRef<'a>),
Psbt(&'a [u8]),
PassportRequest(PassportRequest),
PassportResponse(PassportResponse<'a>),
}Variants§
Bytes(&'a [u8])
bytes.
HDKey(HDKeyRef<'a>)
crypto-hdkey.
Psbt(&'a [u8])
crypto-psbt.
PassportRequest(PassportRequest)
crypto-request for Passport.
PassportResponse(PassportResponse<'a>)
crypto-response for Passport.
Implementations§
Source§impl<'a> Value<'a>
impl<'a> Value<'a>
Sourcepub fn from_ur(ur_type: &str, payload: &'a [u8]) -> Result<Self, Error>
pub fn from_ur(ur_type: &str, payload: &'a [u8]) -> Result<Self, Error>
Construct a new Value from the type and the CBOR payload.
Sourcepub fn ur_type(&self) -> &'static str
pub fn ur_type(&self) -> &'static str
Return the type of this value as a string.
§Notes
This will return the deprecated types as some implementers of UR still don’t support the newer ones.
When changing this to use the newer types also change
Value::from_ur.
Trait Implementations§
impl<'a> StructuralPartialEq for Value<'a>
Auto Trait Implementations§
impl<'a> Freeze for Value<'a>
impl<'a> RefUnwindSafe for Value<'a>
impl<'a> Send for Value<'a>
impl<'a> Sync for Value<'a>
impl<'a> Unpin for Value<'a>
impl<'a> UnwindSafe for Value<'a>
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