UnvalidatedNetlinkMessage

Trait UnvalidatedNetlinkMessage 

Source
pub trait UnvalidatedNetlinkMessage {
    type Message;
    type Credentials;

    // Required method
    fn validate_creds_and_get_message<PS: AccessControl<Self::Credentials>>(
        self,
        access_control: &PS,
    ) -> Result<NetlinkMessage<Self::Message>, ValidationError>;
}
Expand description

A trait abstracting a yet unvalidated netlink message.

This trait provides storage-abstraction for NetlinkMessageWithCreds.

Required Associated Types§

Source

type Message

The message type in this unvalidated message.

Source

type Credentials

The credentials type required for validation.

Required Methods§

Source

fn validate_creds_and_get_message<PS: AccessControl<Self::Credentials>>( self, access_control: &PS, ) -> Result<NetlinkMessage<Self::Message>, ValidationError>

Validates permission using the specified AccessControl and returns the parsed message. If the permission is not granted then return an error that should be sent back to the client.

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§