pub struct PortableCapacityScope {
pub id: String,
pub scope: PortableScope,
pub enabled: bool,
pub effective: bool,
pub capacity: Option<i64>,
pub unit: Option<String>,
pub calculation: PortableCalculation,
pub extensions: PortableExtensions,
pub unknown: PortableExtensions,
}Expand description
One configured scope: its configuration, the shared calculation, and its preserved metadata (T040).
The configuration fields are the entry verbatim (capacity as the i64 the entry
stores, unit, enabled), so a disabled entry’s retained ceiling is carried rather
than dropped; effective is the entry’s own answer for whether a ceiling is in force.
The calculation is the shared DTO, and it reports state = "unconfigured" for an entry
that is not in force — the explicit state, never a zero.
extensions and unknown are the two preservation channels the module docs describe:
the entry’s unknown keys live in the nested object, so one named calculation cannot
shadow the real one.
Fields§
§id: StringThe [capacity.<id>] handle the entry is stored under.
scope: PortableScopeThe scope the entry names.
enabled: boolWhether the entry is enabled.
effective: boolWhether a ceiling is in force (enabled with a value and a unit).
capacity: Option<i64>The ceiling the entry stores, verbatim, or null when it stores none.
unit: Option<String>The unit the entry stores, verbatim, or null when it stores none.
calculation: PortableCalculationThe shared calculation for this scope.
extensions: PortableExtensionsThe entry’s unknown keys, preserved verbatim in a namespace of their own.
unknown: PortableExtensionsKeys a newer writer placed directly on this node, preserved verbatim.
Trait Implementations§
Source§impl Clone for PortableCapacityScope
impl Clone for PortableCapacityScope
Source§impl Debug for PortableCapacityScope
impl Debug for PortableCapacityScope
Source§impl<'de> Deserialize<'de> for PortableCapacityScope
impl<'de> Deserialize<'de> for PortableCapacityScope
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>,
Source§impl PartialEq for PortableCapacityScope
impl PartialEq for PortableCapacityScope
Source§impl Serialize for PortableCapacityScope
impl Serialize for PortableCapacityScope
impl StructuralPartialEq for PortableCapacityScope
Auto Trait Implementations§
impl Freeze for PortableCapacityScope
impl RefUnwindSafe for PortableCapacityScope
impl Send for PortableCapacityScope
impl Sync for PortableCapacityScope
impl Unpin for PortableCapacityScope
impl UnsafeUnpin for PortableCapacityScope
impl UnwindSafe for PortableCapacityScope
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
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> ⓘ
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