pub struct TestModel {
pub id: Option<i64>,
pub name: String,
pub slug: String,
pub created_at: String,
}Expand description
Test model for view tests
Fields§
§id: Option<i64>Primary key identifier.
name: StringDisplay name of the test model.
slug: StringURL-safe slug derived from the name.
created_at: StringISO 8601 timestamp of creation.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TestModel
impl<'de> Deserialize<'de> for TestModel
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TestModel, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TestModel, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Model for TestModel
impl Model for TestModel
Source§type PrimaryKey = i64
type PrimaryKey = i64
The primary key type
Source§type Fields = TestModelFields
type Fields = TestModelFields
Type-safe field selector Read more
Source§fn table_name() -> &'static str
fn table_name() -> &'static str
Get the table name
Source§fn primary_key(&self) -> Option<<TestModel as Model>::PrimaryKey>
fn primary_key(&self) -> Option<<TestModel as Model>::PrimaryKey>
Get the primary key value Read more
Source§fn set_primary_key(&mut self, value: <TestModel as Model>::PrimaryKey)
fn set_primary_key(&mut self, value: <TestModel as Model>::PrimaryKey)
Set the primary key value
Source§fn primary_key_field() -> &'static str
fn primary_key_field() -> &'static str
Get the primary key field name
Source§fn new_fields() -> <TestModel as Model>::Fields
fn new_fields() -> <TestModel as Model>::Fields
Create a new field selector instance Read more
Source§fn composite_primary_key() -> Option<CompositePrimaryKey>
fn composite_primary_key() -> Option<CompositePrimaryKey>
Get composite primary key definition if this model uses composite PK Read more
Source§fn get_composite_pk_values(&self) -> HashMap<String, PkValue>
fn get_composite_pk_values(&self) -> HashMap<String, PkValue>
Get composite primary key values for this instance Read more
Source§fn relationship_metadata() -> Vec<RelationInfo>
fn relationship_metadata() -> Vec<RelationInfo>
Get relationship metadata for inspection Read more
Source§fn constraint_metadata() -> Vec<ConstraintInfo>
fn constraint_metadata() -> Vec<ConstraintInfo>
Get constraint metadata for inspection Read more
Source§fn objects() -> Manager<Self>where
Self: Sized,
fn objects() -> Manager<Self>where
Self: Sized,
Django-style objects manager accessor Read more
Source§impl Serialize for TestModel
impl Serialize for TestModel
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for TestModel
Auto Trait Implementations§
impl Freeze for TestModel
impl RefUnwindSafe for TestModel
impl Send for TestModel
impl Sync for TestModel
impl Unpin for TestModel
impl UnsafeUnpin for TestModel
impl UnwindSafe for TestModel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<E> ServerFnErrorAssertions<E> for Ewhere
E: Debug,
impl<E> ServerFnErrorAssertions<E> for Ewhere
E: Debug,
Source§fn should_contain_message(&self, expected: &str)where
E: Display,
fn should_contain_message(&self, expected: &str)where
E: Display,
Assert that the error message contains the specified text.
Source§fn should_have_message(&self, expected: &str)where
E: Display,
fn should_have_message(&self, expected: &str)where
E: Display,
Assert that the error message matches exactly.