Skip to main content

nominal_api/conjure/objects/persistent/compute/api/
subscription_creation_error.rs

1/// This will be sent if there is an error while creating a subscription. This means that the subscription was
2/// never created and the client will have to re-try creating it if warranted.
3/// This can also be sent after a subscription was first successfully started and sent result. In that case it
4/// means that the subscription encountered an unrecoverable error at runtime and will be stopped.
5#[derive(
6    Debug,
7    Clone,
8    conjure_object::serde::Serialize,
9    conjure_object::serde::Deserialize,
10    PartialEq,
11    Eq,
12    PartialOrd,
13    Ord,
14    Hash
15)]
16#[serde(crate = "conjure_object::serde")]
17#[conjure_object::private::staged_builder::staged_builder]
18#[builder(crate = conjure_object::private::staged_builder, update, inline)]
19pub struct SubscriptionCreationError {
20    #[builder(
21        custom(
22            type = super::super::super::super::api::SerializableError,
23            convert = Box::new
24        )
25    )]
26    #[serde(rename = "serializableError")]
27    serializable_error: Box<super::super::super::super::api::SerializableError>,
28}
29impl SubscriptionCreationError {
30    /// Constructs a new instance of the type.
31    #[inline]
32    pub fn new(
33        serializable_error: super::super::super::super::api::SerializableError,
34    ) -> Self {
35        Self::builder().serializable_error(serializable_error).build()
36    }
37    /// A serialized version of the error. Should match the errors defined below.
38    #[inline]
39    pub fn serializable_error(
40        &self,
41    ) -> &super::super::super::super::api::SerializableError {
42        &*self.serializable_error
43    }
44}