pub struct ResourceRef {
pub id: String,
pub type_: ResourceType,
}Expand description
New ResourceRef that works with any resource type. This can eventually replace the enum-based ResourceRef for full extensibility.
JSON schema
{
"description": "New ResourceRef that works with any resource type.\nThis can eventually replace the enum-based ResourceRef for full extensibility.",
"type": "object",
"required": [
"id",
"type"
],
"properties": {
"id": {
"type": "string"
},
"type": {
"$ref": "#/components/schemas/ResourceType"
}
}
}Fields§
§id: String§type_: ResourceTypeImplementations§
Source§impl ResourceRef
impl ResourceRef
pub fn builder() -> ResourceRef
Trait Implementations§
Source§impl Clone for ResourceRef
impl Clone for ResourceRef
Source§fn clone(&self) -> ResourceRef
fn clone(&self) -> ResourceRef
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 ResourceRef
impl Debug for ResourceRef
Source§impl<'de> Deserialize<'de> for ResourceRef
impl<'de> Deserialize<'de> for ResourceRef
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<&ResourceRef> for ResourceRef
impl From<&ResourceRef> for ResourceRef
Source§fn from(value: &ResourceRef) -> Self
fn from(value: &ResourceRef) -> Self
Converts to this type from the input type.
Source§impl From<ResourceRef> for ResourceRef
impl From<ResourceRef> for ResourceRef
Source§fn from(value: ResourceRef) -> Self
fn from(value: ResourceRef) -> Self
Converts to this type from the input type.
Source§impl Serialize for ResourceRef
impl Serialize for ResourceRef
Source§impl TryFrom<ResourceRef> for ResourceRef
impl TryFrom<ResourceRef> for ResourceRef
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: ResourceRef) -> Result<Self, ConversionError>
fn try_from(value: ResourceRef) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for ResourceRef
impl RefUnwindSafe for ResourceRef
impl Send for ResourceRef
impl Sync for ResourceRef
impl Unpin for ResourceRef
impl UnsafeUnpin for ResourceRef
impl UnwindSafe for ResourceRef
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