[][src]Struct riam::managers::MemoryManager

pub struct MemoryManager { /* fields omitted */ }

An in-memory implemntation of a policy manager

Methods

impl MemoryManager[src]

pub fn new() -> Self[src]

Create a new in-memory manager

Trait Implementations

impl PolicyManager for MemoryManager[src]

fn create(&mut self, policy: Policy) -> Result<Uuid>[src]

Create and store a new policy

fn update(&mut self, policy: &Policy) -> Result<()>[src]

Update an existing policy

fn get(&self, id: &Uuid) -> Result<&Policy>[src]

Get a policy by id

fn delete(&mut self, id: &Uuid) -> Result<()>[src]

Delete a policy

fn list(&self) -> Result<Vec<Policy>>[src]

List all policies

fn get_policies_for_principal(
    &self,
    principal: &str
) -> Result<Option<Vec<Policy>>>
[src]

Get all policies for a given principal

fn attach(&mut self, principal: &str, id: &Uuid) -> Result<()>[src]

Attach a policy to a principal

fn detach(&mut self, principal: &str, id: &Uuid) -> Result<()>[src]

Detach a policy from a principal

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,