pub struct Uid(/* private fields */);Expand description
Opaque, server-assigned identity of one resource incarnation.
A UID changes when a resource is deleted and recreated with the same name.
Implementations§
Source§impl Uid
impl Uid
Sourcepub fn new(value: impl Into<String>) -> ModelResult<Self>
pub fn new(value: impl Into<String>) -> ModelResult<Self>
Sourcepub fn generate() -> ModelResult<Self>
pub fn generate() -> ModelResult<Self>
Generates a UID from 128 bits of operating system entropy.
§Errors
Returns ModelError::Invalid when the entropy source is unavailable.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Uid
impl<'de> Deserialize<'de> for Uid
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 Uid
Source§impl JsonSchema for Uid
impl JsonSchema for Uid
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl Ord for Uid
impl Ord for Uid
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
Source§impl PartialOrd for Uid
impl PartialOrd for Uid
impl StructuralPartialEq for Uid
Auto Trait Implementations§
impl Freeze for Uid
impl RefUnwindSafe for Uid
impl Send for Uid
impl Sync for Uid
impl Unpin for Uid
impl UnsafeUnpin for Uid
impl UnwindSafe for Uid
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