pub struct ApiTestModel {
pub id: Option<i64>,
pub title: String,
pub content: String,
}Expand description
Test model for API view tests
Fields§
§id: Option<i64>Primary key identifier.
title: StringTitle of the API test model entry.
content: StringBody content of the API test model entry.
Trait Implementations§
Source§impl Clone for ApiTestModel
impl Clone for ApiTestModel
Source§fn clone(&self) -> ApiTestModel
fn clone(&self) -> ApiTestModel
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ApiTestModel
impl Debug for ApiTestModel
Source§impl<'de> Deserialize<'de> for ApiTestModel
impl<'de> Deserialize<'de> for ApiTestModel
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ApiTestModel, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ApiTestModel, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Model for ApiTestModel
impl Model for ApiTestModel
Source§type PrimaryKey = i64
type PrimaryKey = i64
The primary key type
Source§type Fields = ApiTestModelFields
type Fields = ApiTestModelFields
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<<ApiTestModel as Model>::PrimaryKey>
fn primary_key(&self) -> Option<<ApiTestModel as Model>::PrimaryKey>
Get the primary key value Read more
Source§fn set_primary_key(&mut self, value: <ApiTestModel as Model>::PrimaryKey)
fn set_primary_key(&mut self, value: <ApiTestModel 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() -> <ApiTestModel as Model>::Fields
fn new_fields() -> <ApiTestModel 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 PartialEq for ApiTestModel
impl PartialEq for ApiTestModel
Source§impl Serialize for ApiTestModel
impl Serialize for ApiTestModel
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 ApiTestModel
Auto Trait Implementations§
impl Freeze for ApiTestModel
impl RefUnwindSafe for ApiTestModel
impl Send for ApiTestModel
impl Sync for ApiTestModel
impl Unpin for ApiTestModel
impl UnsafeUnpin for ApiTestModel
impl UnwindSafe for ApiTestModel
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.