Skip to main content

CapFunctor

Trait CapFunctor 

Source
pub trait CapFunctor {
    type Target<U>;
    type Data;

    // Required methods
    fn cap_map<U, F>(self, f: F) -> Self::Target<U>
       where F: FnOnce(Self::Data) -> U;
    fn cap_flat_map<U, F>(self, f: F) -> Self::Target<U>
       where F: FnOnce(Self::Data) -> Self::Target<U>;
}
Expand description

Phase D: Capability Functor F(Cap ▷ X) = Cap ▷ F(X) - functor composition for security

Required Associated Types§

Required Methods§

Source

fn cap_map<U, F>(self, f: F) -> Self::Target<U>
where F: FnOnce(Self::Data) -> U,

Map function while preserving capability

Source

fn cap_flat_map<U, F>(self, f: F) -> Self::Target<U>
where F: FnOnce(Self::Data) -> Self::Target<U>,

FlatMap with capability composition

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§