Skip to main content

NormalizedAlgorithm

Trait NormalizedAlgorithm 

Source
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§

Source

fn from_object( cx: &mut JSContext, algorithm_name: CryptoAlgorithm, object: HandleObject<'_>, ) -> Fallible<Self>

Source

fn name(&self) -> CryptoAlgorithm

Return the name of the normalized algorithm.

Provided Methods§

Source

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.

Implementors§