pub struct MeshIdentity {
pub workload_spiffe_id: String,
pub attestation: AttestationToken,
}Expand description
One Mesh-attested workload. Carries the SPIFFE ID + the raw attestation token bytes. Validation is the policy enforcer’s job.
Fields§
§workload_spiffe_id: String§attestation: AttestationTokenImplementations§
Source§impl MeshIdentity
impl MeshIdentity
pub fn new(spiffe_id: impl Into<String>, token: AttestationToken) -> Self
Sourcepub fn split_spiffe(&self) -> Option<(&str, &str)>
pub fn split_spiffe(&self) -> Option<(&str, &str)>
Extract (trust_domain, workload_path) from the SPIFFE ID.
Returns None for malformed ids.
pub fn trust_domain(&self) -> Option<&str>
Trait Implementations§
Source§impl Clone for MeshIdentity
impl Clone for MeshIdentity
Source§fn clone(&self) -> MeshIdentity
fn clone(&self) -> MeshIdentity
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 MeshIdentity
impl Debug for MeshIdentity
Source§impl<'de> Deserialize<'de> for MeshIdentity
impl<'de> Deserialize<'de> for MeshIdentity
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for MeshIdentity
impl PartialEq for MeshIdentity
Source§fn eq(&self, other: &MeshIdentity) -> bool
fn eq(&self, other: &MeshIdentity) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MeshIdentity
impl Serialize for MeshIdentity
impl Eq for MeshIdentity
impl StructuralPartialEq for MeshIdentity
Auto Trait Implementations§
impl Freeze for MeshIdentity
impl RefUnwindSafe for MeshIdentity
impl Send for MeshIdentity
impl Sync for MeshIdentity
impl Unpin for MeshIdentity
impl UnsafeUnpin for MeshIdentity
impl UnwindSafe for MeshIdentity
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