pub struct Id<Tag>(/* private fields */);Available on crate feature
id only.Expand description
Tipli UUID identifikator. JSON’da har doim string, DB’da UUID.
parse/from_uuid har qanday RFC 9562 UUID’ni qabul qiladi (struktura);
versiya cheklovi kerak bo’lsa — Id::version bilan tekshiring.
Implementations§
Trait Implementations§
impl<Tag> Copy for Id<Tag>
Source§impl<'de, Tag> Deserialize<'de> for Id<Tag>
Available on crate feature serde only.
impl<'de, Tag> Deserialize<'de> for Id<Tag>
Available on crate feature
serde only.Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'q, DB: Database, Tag> Encode<'q, DB> for Id<Tag>
impl<'q, DB: Database, Tag> Encode<'q, DB> for Id<Tag>
Source§fn encode_by_ref(
&self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, BoxDynError>
fn encode_by_ref( &self, buf: &mut <DB as Database>::ArgumentBuffer<'q>, ) -> Result<IsNull, BoxDynError>
Source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
Self: Sized,
Writes the value of
self into buf in the expected format for the database.fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
Source§impl<'q, DB: Database, Tag> Encode<'q, DB> for Id<Tag>
impl<'q, DB: Database, Tag> Encode<'q, DB> for Id<Tag>
Source§fn encode_by_ref(
&self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, BoxDynError>
fn encode_by_ref( &self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, BoxDynError>
Source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
Self: Sized,
Writes the value of
self into buf in the expected format for the database.fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
impl<Tag> Eq for Id<Tag>
Source§impl<Tag> Ord for Id<Tag>
impl<Tag> Ord for Id<Tag>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl<Tag> PartialOrd for Id<Tag>
impl<Tag> PartialOrd for Id<Tag>
Source§impl<Tag> PgHasArrayType for Id<Tag>where
Uuid: PgHasArrayType,
impl<Tag> PgHasArrayType for Id<Tag>where
Uuid: PgHasArrayType,
fn array_type_info() -> PgTypeInfo
fn array_compatible(ty: &PgTypeInfo) -> bool
Source§impl<Tag> PgHasArrayType for Id<Tag>where
Uuid: PgHasArrayType,
impl<Tag> PgHasArrayType for Id<Tag>where
Uuid: PgHasArrayType,
fn array_type_info() -> PgTypeInfo
fn array_compatible(ty: &PgTypeInfo) -> bool
Source§impl<Tag> Serialize for Id<Tag>
Available on crate feature serde only.serde: Uuid ga delegatsiya — JSON’da string, binary formatlarda (bincode/postcard) 16 bayt.
impl<Tag> Serialize for Id<Tag>
Available on crate feature
serde only.serde: Uuid ga delegatsiya — JSON’da string, binary formatlarda (bincode/postcard) 16 bayt.
Auto Trait Implementations§
impl<Tag> Freeze for Id<Tag>
impl<Tag> RefUnwindSafe for Id<Tag>
impl<Tag> Send for Id<Tag>
impl<Tag> Sync for Id<Tag>
impl<Tag> Unpin for Id<Tag>
impl<Tag> UnsafeUnpin for Id<Tag>
impl<Tag> UnwindSafe for Id<Tag>
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 more