trait NormalizedAlgorithm: Sized {
// Required methods
fn from_object(
cx: &mut JSContext,
algorithm_name: CryptoAlgorithm,
object: HandleObject<'_>,
) -> Fallible<Self>;
fn name(&self) -> CryptoAlgorithm;
// Provided method
fn determine_support_from_operation_steps(
&self,
_length: Option<u32>,
) -> bool { ... }
}Required Methods§
Sourcefn from_object(
cx: &mut JSContext,
algorithm_name: CryptoAlgorithm,
object: HandleObject<'_>,
) -> Fallible<Self>
fn from_object( cx: &mut JSContext, algorithm_name: CryptoAlgorithm, object: HandleObject<'_>, ) -> Fallible<Self>
Sourcefn name(&self) -> CryptoAlgorithm
fn name(&self) -> CryptoAlgorithm
Return the name of the normalized algorithm.
Provided Methods§
Sourcefn determine_support_from_operation_steps(&self, _length: Option<u32>) -> bool
fn determine_support_from_operation_steps(&self, _length: Option<u32>) -> bool
https://wicg.github.io/webcrypto-modern-algos/#dfn-determine-support-from-operation-steps
The default implemenation is to return false, as placeholder. The actual implementation depends on the operation represented by the trait implementor.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.