pub struct Component {Show 16 fields
pub avatar_url: Option<String>,
pub category: Option<String>,
pub created_at: Option<DateTime<Utc>>,
pub description: Option<String>,
pub documentation_link: Option<String>,
pub id: Option<String>,
pub is_archived: Option<bool>,
pub is_public: Option<bool>,
pub latest_version: Option<String>,
pub name: Option<String>,
pub object: Option<String>,
pub repo_link: Option<String>,
pub slug: Option<String>,
pub subcategory: Option<String>,
pub updated_at: Option<DateTime<Utc>>,
pub versions: HashMap<String, ComponentVersion>,
}
Expand description
A component is a reusable piece of code that can be used in multiple projects.
JSON schema
{
"description": "A component is a reusable piece of code that can be used in multiple projects.",
"type": "object",
"properties": {
"avatar_url": {
"description": "Avatar of the component",
"readOnly": true,
"type": "string"
},
"category": {
"description": "Category of the component",
"readOnly": true,
"type": "string"
},
"created_at": {
"description": "Time at which the project was created",
"readOnly": true,
"examples": [
"2022-03-01T00:00:00Z"
],
"type": "string",
"format": "date-time"
},
"description": {
"description": "Description of the component",
"readOnly": true,
"type": "string"
},
"documentation_link": {
"description": "Link to the documentation of the component",
"readOnly": true,
"type": "string"
},
"id": {
"description": "Unique identifier for the component",
"readOnly": true,
"type": "string"
},
"is_archived": {
"description": "Whether the component is archived or not",
"examples": [
false
],
"type": "boolean"
},
"is_public": {
"description": "Whether the component is public or not",
"readOnly": true,
"examples": [
false
],
"type": "boolean"
},
"latest_version": {
"description": "Latest version of the component",
"readOnly": true,
"type": "string"
},
"name": {
"description": "Name of the component",
"readOnly": true,
"type": "string"
},
"object": {
"description": "String representing the object's type. Objects of the same type share the same value",
"readOnly": true,
"examples": [
"component"
],
"type": "string"
},
"repo_link": {
"description": "Link to the repository of the component",
"readOnly": true,
"type": "string"
},
"slug": {
"description": "Slug of the component",
"readOnly": true,
"type": "string"
},
"subcategory": {
"description": "Subcategory of the component",
"readOnly": true,
"type": "string"
},
"updated_at": {
"description": "Time at which the project was last updated",
"readOnly": true,
"examples": [
"2022-03-01T00:00:00Z"
],
"type": "string",
"format": "date-time"
},
"versions": {
"description": "List of versions of the component",
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/ComponentVersion"
}
}
}
}
Fields§
§avatar_url: Option<String>
Avatar of the component
category: Option<String>
Category of the component
created_at: Option<DateTime<Utc>>
Time at which the project was created
description: Option<String>
Description of the component
documentation_link: Option<String>
Link to the documentation of the component
id: Option<String>
Unique identifier for the component
is_archived: Option<bool>
Whether the component is archived or not
is_public: Option<bool>
Whether the component is public or not
latest_version: Option<String>
Latest version of the component
name: Option<String>
Name of the component
object: Option<String>
String representing the object’s type. Objects of the same type share the same value
repo_link: Option<String>
Link to the repository of the component
slug: Option<String>
Slug of the component
subcategory: Option<String>
Subcategory of the component
updated_at: Option<DateTime<Utc>>
Time at which the project was last updated
versions: HashMap<String, ComponentVersion>
List of versions of the component
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Component
impl<'de> Deserialize<'de> for Component
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 JsonSchema for Component
impl JsonSchema for Component
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreAuto Trait Implementations§
impl Freeze for Component
impl RefUnwindSafe for Component
impl Send for Component
impl Sync for Component
impl Unpin for Component
impl UnwindSafe for Component
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