[−][src]Struct rust_sgx_util::Quote
A thin wrapper around vector of bytes. Represents quote obtained from the challenged enclave.
Accessing the underlying bytes buffer
Quote
implements Deref<Target=[u8]>
, therefore dereferencing it will
yield its inner buffer of bytes.
Serializing/deserializing
With with_serde
feature enabled, Quote
can be serialized and deserialized
as base64 String
.
Methods
impl Quote
[src]
pub fn report_data(&self) -> Result<&[u8]>
[src]
Returns report_data
bytes embedded within this Quote
.
The size of the returned slice is 64 bytes.
Errors
This function will fail with Error::QuoteTooShort
if Quote
is shorter than 432
bytes. Note that this is only a quick check
that we can extract the region in Quote
's buffer where we expect
the report_data
to lie in. We don't do any validations on the
Quote
in this method.
Examples
let quote = Quote::from(&[0u8; 438][..]); assert_eq!(quote.report_data().unwrap().len(), 64); let quote = Quote::from(&[0u8; 10][..]); assert!(quote.report_data().is_err());
Trait Implementations
impl Clone for Quote
[src]
impl Debug for Quote
[src]
impl Deref for Quote
[src]
impl<'_> From<&'_ [u8]> for Quote
[src]
impl From<Vec<u8>> for Quote
[src]
Auto Trait Implementations
impl RefUnwindSafe for Quote
impl Send for Quote
impl Sync for Quote
impl Unpin for Quote
impl UnwindSafe for Quote
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,