pub struct UnitId {
pub issuer: Did,
pub resource_class: String,
}Expand description
A resource unit. INV-1(a): the unit names its issuer. Two units with different issuers are different units, full stop — there is no bearer-token representation of value that omits the issuer.
Fields§
§issuer: DidThe resource authority — the liability holder for this unit.
resource_class: Stringe.g. "gpu.h100.seconds".
Trait Implementations§
Source§impl<'de> Deserialize<'de> for UnitId
impl<'de> Deserialize<'de> for UnitId
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
Source§impl Ord for UnitId
impl Ord for UnitId
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 UnitId
impl PartialOrd for UnitId
impl Eq for UnitId
impl StructuralPartialEq for UnitId
Auto Trait Implementations§
impl Freeze for UnitId
impl RefUnwindSafe for UnitId
impl Send for UnitId
impl Sync for UnitId
impl Unpin for UnitId
impl UnsafeUnpin for UnitId
impl UnwindSafe for UnitId
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