pub struct Uuid(/* private fields */);Expand description
RFC 9562; ordered by bytes so version 7 ids sort in creation order.
Implementations§
Source§impl Uuid
impl Uuid
pub const fn from_bytes(bytes: [u8; 16]) -> Uuid
pub const fn from_u128(value: u128) -> Uuid
pub const fn as_bytes(&self) -> &[u8; 16]
pub fn push_to(self, out: &mut String)
pub fn now_v7() -> Result<Uuid, RandomnessUnavailable>
pub fn new_v4() -> Result<Uuid, RandomnessUnavailable>
Trait Implementations§
Source§impl Cast for Uuid
impl Cast for Uuid
const COLUMNS: &'static [ColumnSpec]
fn encode(&self, out: &mut Vec<SqlValue>)
fn decode(row: &mut dyn ColumnReader) -> Result<Uuid, Error>
const NULLABLE: bool = false
Source§const SENSITIVE: bool = false
const SENSITIVE: bool = false
A field holding it is never filtered, sorted, listed or searched, as
#[sensitive] ones.Source§const MOVES: Option<fn(&Self) -> Option<&'static Targets>> = None
const MOVES: Option<fn(&Self) -> Option<&'static Targets>> = None
Set for a value moving between listed states; a save of any other value skips the check.
Source§const HOLDS_STATES: bool = _
const HOLDS_STATES: bool = _
Set when a state anywhere in the value is checked on save, as a field’s of several.
fn refuse_unlisted_move( field: &str, stored: &Self, current: &Self, ) -> Result<(), Error>
impl Copy for Uuid
Source§impl<'de> Deserialize<'de> for Uuid
impl<'de> Deserialize<'de> for Uuid
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Uuid, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Uuid, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Uuid
Source§impl Ord for Uuid
impl Ord for Uuid
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 PartialOrd for Uuid
impl PartialOrd for Uuid
Source§impl Serialize for Uuid
impl Serialize for Uuid
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 Uuid
Auto Trait Implementations§
impl Freeze for Uuid
impl RefUnwindSafe for Uuid
impl Send for Uuid
impl Sync for Uuid
impl Unpin for Uuid
impl UnsafeUnpin for Uuid
impl UnwindSafe for Uuid
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