pub struct IdPolicy { /* private fields */ }Expand description
ID field and transform policy.
Implementations§
Source§impl IdPolicy
impl IdPolicy
pub fn new(generation: IdGeneration) -> Self
pub fn with_database_uuid_support(self, supports_uuid: bool) -> Self
pub fn with_force_allow_id(self, force_allow_id: bool) -> Self
pub fn field(self) -> DbField
pub fn transform_input(self, value: Option<&str>) -> Option<IdValue>
pub fn transform_output(self, value: Option<IdValue>) -> Option<String>
Trait Implementations§
impl Copy for IdPolicy
Source§impl<'de> Deserialize<'de> for IdPolicy
impl<'de> Deserialize<'de> for IdPolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for IdPolicy
impl StructuralPartialEq for IdPolicy
Auto Trait Implementations§
impl Freeze for IdPolicy
impl RefUnwindSafe for IdPolicy
impl Send for IdPolicy
impl Sync for IdPolicy
impl Unpin for IdPolicy
impl UnsafeUnpin for IdPolicy
impl UnwindSafe for IdPolicy
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.