pub struct YamlAdapter<P> { /* private fields */ }

Implementations§

source§

impl<P> YamlAdapter<P>
where P: AsRef<Path> + Send + Sync,

source

pub fn new(p: P) -> YamlAdapter<P>

Trait Implementations§

source§

impl<P> Adapter for YamlAdapter<P>
where P: AsRef<Path> + Send + Sync,

source§

fn load_policy<'life0, 'life1, 'async_trait>( &'life0 mut self, m: &'life1 mut dyn Model ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn load_filtered_policy<'a, 'life0, 'life1, 'async_trait>( &'life0 mut self, m: &'life1 mut dyn Model, f: Filter<'a> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn save_policy<'life0, 'life1, 'async_trait>( &'life0 mut self, m: &'life1 mut dyn Model ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn clear_policy<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn add_policies<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _sec: &'life1 str, ptype: &'life2 str, rules: Vec<Vec<String>> ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

source§

fn add_policy<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _sec: &'life1 str, ptype: &'life2 str, rule: Vec<String> ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

source§

fn is_filtered(&self) -> bool

source§

fn remove_filtered_policy<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _sec: &'life1 str, ptype: &'life2 str, field_index: usize, field_values: Vec<String> ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

source§

fn remove_policies<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _sec: &'life1 str, ptype: &'life2 str, rules: Vec<Vec<String>> ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

source§

fn remove_policy<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _sec: &'life1 str, ptype: &'life2 str, rule: Vec<String> ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Auto Trait Implementations§

§

impl<P> RefUnwindSafe for YamlAdapter<P>
where P: RefUnwindSafe,

§

impl<P> Send for YamlAdapter<P>
where P: Send,

§

impl<P> Sync for YamlAdapter<P>
where P: Sync,

§

impl<P> Unpin for YamlAdapter<P>
where P: Unpin,

§

impl<P> UnwindSafe for YamlAdapter<P>
where P: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> TryIntoAdapter for T
where T: Adapter + 'static,

source§

fn try_into_adapter<'async_trait>( self ) -> Pin<Box<dyn Future<Output = Result<Box<dyn Adapter>, Error>> + Send + 'async_trait>>
where T: 'async_trait,

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more