pub trait ProofServer: MaybeSend + MaybeSync {
// Required method
fn build<'a>(
&'a self,
request: &'a PreparedProof,
source: &'a mut dyn ProofSource,
) -> BoxFuture<'a, Result<Vec<u8>, ServerError>>;
// Provided method
fn is_supported(&self) -> bool { ... }
}Expand description
Build only the already selected representation, after common Admission.
Required Methods§
Sourcefn build<'a>(
&'a self,
request: &'a PreparedProof,
source: &'a mut dyn ProofSource,
) -> BoxFuture<'a, Result<Vec<u8>, ServerError>>
fn build<'a>( &'a self, request: &'a PreparedProof, source: &'a mut dyn ProofSource, ) -> BoxFuture<'a, Result<Vec<u8>, ServerError>>
Return encoded bytes; the common path enforces the planned length.
Provided Methods§
Sourcefn is_supported(&self) -> bool
fn is_supported(&self) -> bool
Whether the adapter can build proofs. Unsupported selections return 416 before admission, rather than reserving an unservable request.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".