make Pod derive from Any (#205)
This commit is contained in:
parent
bf6d8aee8b
commit
58d3c6a236
7 changed files with 29 additions and 56 deletions
|
|
@ -654,7 +654,7 @@ impl Params {
|
|||
}
|
||||
}
|
||||
|
||||
pub trait Pod: fmt::Debug + DynClone {
|
||||
pub trait Pod: fmt::Debug + DynClone + Any {
|
||||
fn verify(&self) -> Result<()>;
|
||||
fn id(&self) -> PodId;
|
||||
fn pub_statements(&self) -> Vec<Statement>;
|
||||
|
|
@ -668,9 +668,6 @@ pub trait Pod: fmt::Debug + DynClone {
|
|||
})
|
||||
.collect()
|
||||
}
|
||||
// Used for downcasting
|
||||
fn into_any(self: Box<Self>) -> Box<dyn Any>;
|
||||
fn as_any(&self) -> &dyn Any;
|
||||
// Front-end Pods keep references to middleware Pods. Most of the
|
||||
// middleware data can be derived directly from front-end data, but the
|
||||
// "proof" data is only created at the point of proving/signing, and
|
||||
|
|
@ -704,12 +701,6 @@ impl Pod for NonePod {
|
|||
fn pub_statements(&self) -> Vec<Statement> {
|
||||
Vec::new()
|
||||
}
|
||||
fn into_any(self: Box<Self>) -> Box<dyn Any> {
|
||||
self
|
||||
}
|
||||
fn as_any(&self) -> &dyn Any {
|
||||
self
|
||||
}
|
||||
fn serialized_proof(&self) -> String {
|
||||
"".to_string()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue