Struct aldrin_core::ServiceCookie
source · #[repr(transparent)]pub struct ServiceCookie(pub Uuid);Expand description
Cookie of a service.
ServiceCookies are chosen by the broker when creating a service. They ensure that
services, created and destroyed over time with the same ServiceUuid and on the same object,
can still be distinguished.
Tuple Fields§
§0: UuidImplementations§
source§impl ServiceCookie
impl ServiceCookie
sourcepub fn new_v4() -> Self
pub fn new_v4() -> Self
Creates a ServiceCookie with a random v4 UUID.
Examples
let service_cookie = ServiceCookie::new_v4();Trait Implementations§
source§impl<'arbitrary> Arbitrary<'arbitrary> for ServiceCookie
impl<'arbitrary> Arbitrary<'arbitrary> for ServiceCookie
source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self from the given unstructured data. Read moresource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self from the entirety of the given
unstructured data. Read moresource§impl Clone for ServiceCookie
impl Clone for ServiceCookie
source§fn clone(&self) -> ServiceCookie
fn clone(&self) -> ServiceCookie
Returns a copy of the value. Read more
1.0.0 · 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 ServiceCookie
impl Debug for ServiceCookie
source§impl Deserialize for ServiceCookie
impl Deserialize for ServiceCookie
fn deserialize( deserializer: Deserializer<'_, '_> ) -> Result<Self, DeserializeError>
source§impl Display for ServiceCookie
impl Display for ServiceCookie
source§impl From<ServiceCookie> for Uuid
impl From<ServiceCookie> for Uuid
source§fn from(cookie: ServiceCookie) -> Self
fn from(cookie: ServiceCookie) -> Self
Converts to this type from the input type.
source§impl From<Uuid> for ServiceCookie
impl From<Uuid> for ServiceCookie
source§impl Hash for ServiceCookie
impl Hash for ServiceCookie
source§impl Ord for ServiceCookie
impl Ord for ServiceCookie
source§fn cmp(&self, other: &ServiceCookie) -> Ordering
fn cmp(&self, other: &ServiceCookie) -> Ordering
1.21.0 · 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 PartialEq for ServiceCookie
impl PartialEq for ServiceCookie
source§fn eq(&self, other: &ServiceCookie) -> bool
fn eq(&self, other: &ServiceCookie) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for ServiceCookie
impl PartialOrd for ServiceCookie
source§fn partial_cmp(&self, other: &ServiceCookie) -> Option<Ordering>
fn partial_cmp(&self, other: &ServiceCookie) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl Serialize for ServiceCookie
impl Serialize for ServiceCookie
fn serialize(&self, serializer: Serializer<'_>) -> Result<(), SerializeError>
impl Copy for ServiceCookie
impl Eq for ServiceCookie
impl StructuralEq for ServiceCookie
impl StructuralPartialEq for ServiceCookie
Auto Trait Implementations§
impl RefUnwindSafe for ServiceCookie
impl Send for ServiceCookie
impl Sync for ServiceCookie
impl Unpin for ServiceCookie
impl UnwindSafe for ServiceCookie
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