pub struct PrimaryKeyModel {
pub name: Option<String>,
pub columns: Vec<String>,
}Expand description
主键约束模型。
Fields§
§name: Option<String>约束名(实际结构来自数据库;期望结构通常为 None,让数据库自动命名)
columns: Vec<String>主键字段(按顺序,联合主键时多于一个)
Trait Implementations§
Source§impl Clone for PrimaryKeyModel
impl Clone for PrimaryKeyModel
Source§fn clone(&self) -> PrimaryKeyModel
fn clone(&self) -> PrimaryKeyModel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PrimaryKeyModel
impl Debug for PrimaryKeyModel
Source§impl Default for PrimaryKeyModel
impl Default for PrimaryKeyModel
Source§fn default() -> PrimaryKeyModel
fn default() -> PrimaryKeyModel
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PrimaryKeyModel
impl<'de> Deserialize<'de> for PrimaryKeyModel
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PrimaryKeyModel, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PrimaryKeyModel, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PrimaryKeyModel
Source§impl PartialEq for PrimaryKeyModel
impl PartialEq for PrimaryKeyModel
Source§impl Serialize for PrimaryKeyModel
impl Serialize for PrimaryKeyModel
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 PrimaryKeyModel
Auto Trait Implementations§
impl Freeze for PrimaryKeyModel
impl RefUnwindSafe for PrimaryKeyModel
impl Send for PrimaryKeyModel
impl Sync for PrimaryKeyModel
impl Unpin for PrimaryKeyModel
impl UnsafeUnpin for PrimaryKeyModel
impl UnwindSafe for PrimaryKeyModel
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