Trait PolicyRuleExt

Source
pub trait PolicyRuleExt: Sized {
    // Required methods
    fn new<T: Resource>() -> Self;
    fn api_group(self, group: impl ToString) -> Self;
    fn api_groups(self, groups: impl IntoIterator<Item = impl ToString>) -> Self;
    fn resource(self, resource: impl ToString) -> Self;
    fn resources(
        self,
        resources: impl IntoIterator<Item = impl ToString>,
    ) -> Self;
    fn resource_names(
        self,
        names: impl IntoIterator<Item = impl ToString>,
    ) -> Self;
    fn with_status(self) -> Self;
    fn verb(self, verb: impl ToString) -> Self;
    fn verbs(self, verbs: impl IntoIterator<Item = impl ToString>) -> Self;

    // Provided methods
    fn resource_name(self, name: impl ToString) -> Self { ... }
    fn all_resources(self) -> Self { ... }
    fn all_verbs(self) -> Self { ... }
}

Required Methods§

Source

fn new<T: Resource>() -> Self

Source

fn api_group(self, group: impl ToString) -> Self

Source

fn api_groups(self, groups: impl IntoIterator<Item = impl ToString>) -> Self

Source

fn resource(self, resource: impl ToString) -> Self

Source

fn resources(self, resources: impl IntoIterator<Item = impl ToString>) -> Self

Source

fn resource_names(self, names: impl IntoIterator<Item = impl ToString>) -> Self

Source

fn with_status(self) -> Self

Source

fn verb(self, verb: impl ToString) -> Self

Source

fn verbs(self, verbs: impl IntoIterator<Item = impl ToString>) -> Self

Provided Methods§

Source

fn resource_name(self, name: impl ToString) -> Self

Source

fn all_resources(self) -> Self

Source

fn all_verbs(self) -> Self

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§