pub struct Document {
pub context: Vec<String>,
pub id: String,
pub also_known_as: Vec<String>,
pub service: Vec<Service>,
pub verification_method: Vec<VerificationMethod>,
pub extra: HashMap<String, Value>,
}Expand description
Complete DID document containing identity information. Contains services, verification methods, and aliases for a DID.
Fields§
§context: Vec<String>JSON-LD context URLs defining the semantics of the DID document. Typically includes “https://www.w3.org/ns/did/v1” and method-specific contexts.
id: StringThe DID identifier (e.g., “did:plc:abc123”).
also_known_as: Vec<String>Alternative identifiers like handles and domains.
service: Vec<Service>Available services for this identity.
verification_method: Vec<VerificationMethod>Cryptographic verification methods.
extra: HashMap<String, Value>Additional document properties not explicitly defined.
Implementations§
Source§impl Document
impl Document
Sourcepub fn builder() -> DocumentBuilder
pub fn builder() -> DocumentBuilder
Creates a new DocumentBuilder for constructing a Document.
Sourcepub fn pds_endpoints(&self) -> Vec<&str>
pub fn pds_endpoints(&self) -> Vec<&str>
Extracts Personal Data Server endpoints from services. Returns URLs of all AtprotoPersonalDataServer services.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Document
impl<'de> Deserialize<'de> for Document
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
impl StructuralPartialEq for Document
Auto Trait Implementations§
impl Freeze for Document
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnwindSafe for Document
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