pub trait LogEntryMethods {
// Required methods
fn get_version_time_string(&self) -> String;
fn get_version_time(&self) -> DateTime<FixedOffset>;
fn get_version_id(&self) -> &str;
fn set_version_id(&mut self, version_id: &str);
fn get_parameters(&self) -> Parameters;
fn add_proof(&mut self, proof: DataIntegrityProof);
fn get_proofs(&self) -> &[DataIntegrityProof];
fn clear_proofs(&mut self);
fn get_scid(&self) -> Option<&str>;
fn get_state(&self) -> &Value;
fn get_did_document(&self) -> Result<Value, DIDWebVHError>;
}Expand description
Common accessors shared by all log entry versions.
Required Methods§
Sourcefn get_version_time_string(&self) -> String
fn get_version_time_string(&self) -> String
LogEntry Parameters versionTime
Sourcefn get_version_time(&self) -> DateTime<FixedOffset>
fn get_version_time(&self) -> DateTime<FixedOffset>
LogEntry Parameters versionTime
Sourcefn get_version_id(&self) -> &str
fn get_version_id(&self) -> &str
Returns the versionId for this log entry.
Sourcefn set_version_id(&mut self, version_id: &str)
fn set_version_id(&mut self, version_id: &str)
Set the versionId to an updated value.
Sourcefn get_parameters(&self) -> Parameters
fn get_parameters(&self) -> Parameters
Get Parameters
Sourcefn add_proof(&mut self, proof: DataIntegrityProof)
fn add_proof(&mut self, proof: DataIntegrityProof)
Add a proof for this log entry.
Sourcefn get_proofs(&self) -> &[DataIntegrityProof]
fn get_proofs(&self) -> &[DataIntegrityProof]
Get proofs for this log entry.
Sourcefn clear_proofs(&mut self)
fn clear_proofs(&mut self)
Resets all proofs for this LogEntry
Sourcefn get_did_document(&self) -> Result<Value, DIDWebVHError>
fn get_did_document(&self) -> Result<Value, DIDWebVHError>
Returns a full DID Document including implied services
(#files / #whois).
This builds a fresh Value by cloning state and appending any
missing implicit services — the LogEntry itself is not mutated.
The returned document is for resolution / display only.
§⚠ DO NOT feed this back into create_log_entry or update
The hash chain (versionId, SCID, eddsa-jcs-2022 proofs) is
computed over the LogEntry’s stored state, which by spec excludes
the implicit services. Passing the augmented document from
get_did_document() as the new state would bake #files and
#whois into the canonical bytes, breaking interop with every other
didwebvh implementation. If you need the document for an update, use
get_state instead.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".