pub enum ArcIdentity {
Anonymous(Arc<AnonymousIdentity>),
Ed25519(Arc<BasicIdentity>),
Delegated(Arc<DelegatedIdentity>),
}Expand description
Arc-wrapped identity that can be one of several identity types.
This enum provides a way to work with different identity types in a uniform manner
while maintaining reference counting through Arc for efficient cloning and sharing.
Variants§
Anonymous(Arc<AnonymousIdentity>)
An anonymous identity that provides no authentication.
Ed25519(Arc<BasicIdentity>)
An Ed25519-based identity using a basic cryptographic key pair.
Delegated(Arc<DelegatedIdentity>)
A delegated identity that uses delegation chains for authentication.
Implementations§
Source§impl ArcIdentity
impl ArcIdentity
Sourcepub fn as_arc_identity(&self) -> Arc<dyn Identity>
pub fn as_arc_identity(&self) -> Arc<dyn Identity>
Returns the underlying identity as an Arc<dyn Identity>.
Arc<dyn Identity> implements the Identity trait, making it directly usable for tasks like login.
Sourcepub fn public_key(&self) -> Option<Vec<u8>>
pub fn public_key(&self) -> Option<Vec<u8>>
Returns the public key associated with this identity, if available.
This method delegates to the underlying identity’s public_key() method.
The availability and format of the public key depends on the specific identity type.
Trait Implementations§
Source§impl Clone for ArcIdentity
impl Clone for ArcIdentity
Source§fn clone(&self) -> ArcIdentity
fn clone(&self) -> ArcIdentity
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more