pub struct KayrosEnvelope {
pub data: String,
pub data_format: ProofDataFormat,
pub kayros: KayrosData,
/* private fields */
}Fields§
§data: String§data_format: ProofDataFormat§kayros: KayrosDataImplementations§
Source§impl KayrosEnvelope
impl KayrosEnvelope
pub fn new( data: impl Into<String>, kayros: KayrosData, data_format: impl Into<String>, ) -> Result<Self>
pub fn from_bytes( data: &[u8], kayros: KayrosData, data_format: impl Into<String>, ) -> Result<Self>
pub fn from_text( data: &str, kayros: KayrosData, data_format: impl Into<String>, ) -> Result<Self>
pub fn from_json_value<T: Serialize>( data: &T, kayros: KayrosData, data_format: impl Into<String>, ) -> Result<Self>
pub fn from_json_str(json: &str) -> Result<Self>
pub fn get_data_format(&self) -> String
pub fn get_data_hash(&self) -> Option<String>
pub fn get_data_type(&self) -> Option<String>
pub fn get_data_type_label(&self) -> Option<String>
pub fn get_data_type_lookup_candidates(&self) -> Vec<Option<String>>
pub fn get_kayros_hash(&self) -> Option<String>
pub fn get_timeuuid(&self) -> Option<String>
pub fn get_hash_algorithm(&self) -> String
pub fn get_data(&self) -> &[u8] ⓘ
pub fn get_data_text(&self) -> Result<String>
pub fn parse_data_json<T: DeserializeOwned>(&self) -> Result<T>
pub fn to_proof(&self) -> KayrosProof
pub fn compute_data_hash(&self) -> Result<String>
Trait Implementations§
Source§impl Clone for KayrosEnvelope
impl Clone for KayrosEnvelope
Source§fn clone(&self) -> KayrosEnvelope
fn clone(&self) -> KayrosEnvelope
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 KayrosEnvelope
impl Debug for KayrosEnvelope
Source§impl PartialEq for KayrosEnvelope
impl PartialEq for KayrosEnvelope
Source§fn eq(&self, other: &KayrosEnvelope) -> bool
fn eq(&self, other: &KayrosEnvelope) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for KayrosEnvelope
Auto Trait Implementations§
impl Freeze for KayrosEnvelope
impl RefUnwindSafe for KayrosEnvelope
impl Send for KayrosEnvelope
impl Sync for KayrosEnvelope
impl Unpin for KayrosEnvelope
impl UnsafeUnpin for KayrosEnvelope
impl UnwindSafe for KayrosEnvelope
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