Model

Struct Model 

Source
pub struct Model {
    pub id: PermissionId,
    pub action: String,
}
Available on crate feature rbac only.

Fieldsยง

ยงid: PermissionIdยงaction: String

Implementationsยง

Sourceยง

impl Model

Source

pub fn into_ex(self) -> Self

Generated by sea-orm-macros

Trait Implementationsยง

Sourceยง

impl Clone for Model

Sourceยง

fn clone(&self) -> Model

Returns a duplicate of the value. Read more
1.0.0 ยท Sourceยง

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Sourceยง

impl Debug for Model

Sourceยง

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Sourceยง

impl From<Model> for ActiveModel

Sourceยง

fn from(m: Model) -> Self

Converts to this type from the input type.
Sourceยง

impl From<Model> for PermissionRequest

Sourceยง

fn from(permission: Permission) -> Self

Converts to this type from the input type.
Sourceยง

impl FromQueryResult for Model

Sourceยง

fn from_query_result(row: &QueryResult, pre: &str) -> Result<Self, DbErr>

Instantiate a Model from a QueryResult Read more
Sourceยง

fn from_query_result_optional( res: &QueryResult, pre: &str, ) -> Result<Option<Self>, DbErr>

Transform the error from instantiating a Model from a QueryResult and converting it to an Option
Sourceยง

fn from_query_result_nullable( res: &QueryResult, pre: &str, ) -> Result<Self, TryGetError>

Transform the error from instantiating a Model from a QueryResult and converting it to an Option Read more
Sourceยง

fn find_by_statement(stmt: Statement) -> SelectorRaw<SelectModel<Self>>

Sourceยง

impl IntoActiveModel<ActiveModel> for Model

Sourceยง

fn into_active_model(self) -> ActiveModel

Method to call to perform the conversion
Sourceยง

impl ModelTrait for Model

Sourceยง

type Entity = Entity

Sourceยง

fn get(&self, c: <Self::Entity as EntityTrait>::Column) -> Value

Get the Value of a column from a Model
Sourceยง

fn get_value_type(c: <Self::Entity as EntityTrait>::Column) -> ArrayType

Get the Value Type of a column from the Model
Sourceยง

fn try_set( &mut self, c: <Self::Entity as EntityTrait>::Column, v: Value, ) -> Result<(), DbErr>

Set the Value of a Model field, return error if failed
Sourceยง

fn set(&mut self, c: <Self::Entity as EntityTrait>::Column, v: Value)

Set the Value of a Model field, panic if failed
Find related Models belonging to self
Sourceยง

fn find_linked<L>(&self, l: L) -> Select<L::ToEntity>
where L: Linked<FromEntity = Self::Entity>,

Find linked Models belonging to self
Sourceยง

fn delete<'a, A, C>(self, db: &'a C) -> Result<DeleteResult, DbErr>
where Self: IntoActiveModel<A>, C: ConnectionTrait, A: ActiveModelTrait<Entity = Self::Entity> + ActiveModelBehavior + 'a,

Delete a model
Sourceยง

fn get_primary_key_value(&self) -> ValueTuple

Get the primary key value of the Model
Sourceยง

impl PartialEq for Model

Sourceยง

fn eq(&self, other: &Model) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 ยท Sourceยง

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Sourceยง

impl TryFrom<ActiveModel> for Model

Sourceยง

type Error = DbErr

The type returned in the event of a conversion error.
Sourceยง

fn try_from(a: ActiveModel) -> Result<Self, DbErr>

Performs the conversion.
Sourceยง

impl TryIntoModel<Model> for ActiveModel

Sourceยง

fn try_into_model(self) -> Result<Model, DbErr>

Method to call to perform the conversion
Sourceยง

impl Eq for Model

Sourceยง

impl StructuralPartialEq for Model

Auto Trait Implementationsยง

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> CloneToUninit for T
where T: Clone,

Sourceยง

unsafe fn clone_to_uninit(&self, dest: *mut u8)

๐Ÿ”ฌThis is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Sourceยง

impl<T> From<T> for T

Sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

Sourceยง

impl<T> Instrument for T

Sourceยง

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

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Sourceยง

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> IntoEither for T

Sourceยง

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Sourceยง

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Sourceยง

impl<M> IntoMockRow for M
where M: ModelTrait,

Sourceยง

fn into_mock_row(self) -> MockRow

Available on crate feature mock only.
The method to perform this operation
Sourceยง

impl<T> PartialModelTrait for T

Sourceยง

fn select_cols_nested<S>( select: S, prefix: Option<&str>, alias: Option<&'static str>, ) -> S
where S: QuerySelect,

Used when nesting these structs into each other. Read more
Sourceยง

fn select_cols<S: QuerySelect>(select: S) -> S

Select specific columns this [PartialModel] needs Read more
Sourceยง

impl<T> ToOwned for T
where T: Clone,

Sourceยง

type Owned = T

The resulting type after obtaining ownership.
Sourceยง

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Sourceยง

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Sourceยง

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

Sourceยง

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>,

Sourceยง

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<M> TryIntoModel<M> for M
where M: ModelTrait,

Sourceยง

fn try_into_model(self) -> Result<M, DbErr>

Method to call to perform the conversion
Sourceยง

impl<T> WithSubscriber for T

Sourceยง

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
Sourceยง

fn with_current_subscriber(self) -> WithDispatch<Self>

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