pub struct AllocationStatus {
pub derived_from: Option<String>,
pub notifications: Vec<Notification>,
pub provisioned: bool,
}Expand description
AllocationStatus
JSON schema
{
"type": "object",
"required": [
"notifications",
"provisioned"
],
"properties": {
"derivedFrom": {
"description": "pointer to the parent allocation or limit that caused this allocation to be implicitly created\n",
"type": "string"
},
"notifications": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Notification"
}
},
"provisioned": {
"description": "indicates whether configuration and actual state match",
"type": "boolean"
}
},
"example": {
"derivedFrom": "derivedFrom",
"notifications": [
{
"args": {
"key": "args"
},
"message": "message",
"remove": true
},
{
"args": {
"key": "args"
},
"message": "message",
"remove": true
}
],
"provisioned": true
}
}Fields§
§derived_from: Option<String>pointer to the parent allocation or limit that caused this allocation to be implicitly created
notifications: Vec<Notification>§provisioned: boolindicates whether configuration and actual state match
Implementations§
Source§impl AllocationStatus
impl AllocationStatus
pub fn builder() -> AllocationStatus
Source§impl AllocationStatus
impl AllocationStatus
Sourcepub fn new<T>(derived_from: T, provisioned: bool) -> Self
pub fn new<T>(derived_from: T, provisioned: bool) -> Self
§Create a new AllocationStatus
Create a new AllocationStatus from the provided parameters.
The other fields of the AllocationStatus instance will be set to their default values.
§Parameters
derived_from- name of the service that the resource for this allocation status was derived fromprovisioned- whether the service was provisioned
§Returns
The created AllocationStatus.
§Example
let allocation_status = AllocationStatus::new("my-service", true);
assert_eq!(allocation_status.derived_from.unwrap(), "my-service".to_string());
assert_eq!(allocation_status.provisioned, true);
assert!(allocation_status.notifications.is_empty());Trait Implementations§
Source§impl Clone for AllocationStatus
impl Clone for AllocationStatus
Source§fn clone(&self) -> AllocationStatus
fn clone(&self) -> AllocationStatus
Returns a duplicate 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 AllocationStatus
impl Debug for AllocationStatus
Source§impl Default for AllocationStatus
impl Default for AllocationStatus
Source§impl<'de> Deserialize<'de> for AllocationStatus
impl<'de> Deserialize<'de> for AllocationStatus
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 Display for AllocationStatus
impl Display for AllocationStatus
Source§impl From<AllocationStatus> for AllocationStatus
impl From<AllocationStatus> for AllocationStatus
Source§fn from(value: AllocationStatus) -> Self
fn from(value: AllocationStatus) -> Self
Converts to this type from the input type.
Source§impl From<AllocationStatus> for AllocationStatus1
impl From<AllocationStatus> for AllocationStatus1
Source§fn from(value: AllocationStatus) -> Self
fn from(value: AllocationStatus) -> Self
Converts to this type from the input type.
Source§impl From<AllocationStatus1> for AllocationStatus
impl From<AllocationStatus1> for AllocationStatus
Source§fn from(value: AllocationStatus1) -> Self
fn from(value: AllocationStatus1) -> Self
Converts to this type from the input type.
Source§impl PartialEq for AllocationStatus
impl PartialEq for AllocationStatus
Source§impl Serialize for AllocationStatus
impl Serialize for AllocationStatus
Source§impl TryFrom<AllocationStatus> for AllocationStatus
impl TryFrom<AllocationStatus> for AllocationStatus
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: AllocationStatus) -> Result<Self, ConversionError>
fn try_from(value: AllocationStatus) -> Result<Self, ConversionError>
Performs the conversion.
impl StructuralPartialEq for AllocationStatus
Auto Trait Implementations§
impl Freeze for AllocationStatus
impl RefUnwindSafe for AllocationStatus
impl Send for AllocationStatus
impl Sync for AllocationStatus
impl Unpin for AllocationStatus
impl UnsafeUnpin for AllocationStatus
impl UnwindSafe for AllocationStatus
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.