MCPcopy Index your code
hub / github.com/Dstack-TEE/dstack / to_bytes

Method to_bytes

dstack-attest/src/attestation.rs:421–429  ·  view source on GitHub ↗

Encode versioned attestation bytes.

(&self)

Source from the content-addressed store, hash-verified

419
420 /// Encode versioned attestation bytes.
421 pub fn to_bytes(&self) -> Result<Vec<u8>> {
422 match self {
423 Self::V0 { attestation } => Ok(LegacyVersionedAttestation::V0 {
424 attestation: attestation.clone(),
425 }
426 .encode()),
427 Self::V1 { attestation } => attestation.to_msgpack(),
428 }
429 }
430
431 #[doc(hidden)]
432 pub fn from_scale(bytes: &[u8]) -> Result<Self> {

Callers 15

encode_toMethod · 0.80
to_scaleMethod · 0.80
store_keysMethod · 0.80
derive_k256_keyFunction · 0.80
get_app_keyMethod · 0.80
verify_signature_v1Function · 0.80
make_app_keysFunction · 0.80
dh_agreeFunction · 0.80
requestMethod · 0.80

Calls 2

cloneMethod · 0.80
to_msgpackMethod · 0.80

Tested by

no test coverage detected