Struct create_rust_app::auth::Role
source · [−]pub struct Role;Implementations
sourceimpl Role
impl Role
pub fn assign(db: &Connection, user_id: i32, role: &str) -> Result<bool>
pub fn assign_many(
db: &Connection,
user_id: i32,
roles: Vec<String>
) -> Result<bool>
pub fn unassign(db: &Connection, user_id: i32, role: &str) -> Result<bool>
pub fn unassign_many(
db: &Connection,
user_id: i32,
roles: Vec<String>
) -> Result<bool>
pub fn fetch_all(db: &Connection, user_id: i32) -> Result<Vec<String>>
Auto Trait Implementations
impl RefUnwindSafe for Role
impl Send for Role
impl Sync for Role
impl Unpin for Role
impl UnwindSafe for Role
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> IntoSql for T
impl<T> IntoSql for T
sourcefn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
Convert self to an expression for Diesel’s query builder. Read more
sourcefn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
Convert &self to an expression for Diesel’s query builder. Read more