pub struct BaseResource {
pub id: String,
pub type_: ResourceType,
}Expand description
Resource that can hold any resource type in the Alien system. All resources share common ‘type’ and ‘id’ fields with additional type-specific properties.
JSON schema
{
"description": "Resource that can hold any resource type in the Alien system. All resources share common 'type' and 'id' fields with additional type-specific properties.",
"type": "object",
"required": [
"id",
"type"
],
"properties": {
"id": {
"description": "The unique identifier for this specific resource instance. Must contain only alphanumeric characters, hyphens, and underscores ([A-Za-z0-9-_]). Maximum 64 characters.",
"type": "string"
},
"type": {
"$ref": "#/components/schemas/ResourceType"
}
},
"additionalProperties": true
}Fields§
§id: StringThe unique identifier for this specific resource instance. Must contain only alphanumeric characters, hyphens, and underscores ([A-Za-z0-9-_]). Maximum 64 characters.
type_: ResourceTypeImplementations§
Source§impl BaseResource
impl BaseResource
pub fn builder() -> BaseResource
Trait Implementations§
Source§impl Clone for BaseResource
impl Clone for BaseResource
Source§fn clone(&self) -> BaseResource
fn clone(&self) -> BaseResource
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 BaseResource
impl Debug for BaseResource
Source§impl<'de> Deserialize<'de> for BaseResource
impl<'de> Deserialize<'de> for BaseResource
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 From<&BaseResource> for BaseResource
impl From<&BaseResource> for BaseResource
Source§fn from(value: &BaseResource) -> Self
fn from(value: &BaseResource) -> Self
Converts to this type from the input type.
Source§impl From<BaseResource> for BaseResource
impl From<BaseResource> for BaseResource
Source§fn from(value: BaseResource) -> Self
fn from(value: BaseResource) -> Self
Converts to this type from the input type.
Source§impl Serialize for BaseResource
impl Serialize for BaseResource
Source§impl TryFrom<BaseResource> for BaseResource
impl TryFrom<BaseResource> for BaseResource
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: BaseResource) -> Result<Self, ConversionError>
fn try_from(value: BaseResource) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for BaseResource
impl RefUnwindSafe for BaseResource
impl Send for BaseResource
impl Sync for BaseResource
impl Unpin for BaseResource
impl UnsafeUnpin for BaseResource
impl UnwindSafe for BaseResource
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