pub struct SearchHit {Show 15 fields
pub project_type: String,
pub downloads: i32,
pub project_id: String,
pub author: String,
pub versions: Vec<String>,
pub follows: i32,
pub date_created: String,
pub date_modified: String,
pub license: String,
pub slug: Option<String>,
pub title: Option<String>,
pub description: Option<String>,
pub categories: Option<Vec<String>>,
pub client_side: Option<String>,
pub server_side: Option<String>,
}Expand description
搜索接口中返回的单条目,它的结构与 Project 高度类似,
但 Modrinth API 在部分属性名的设计上会有不同。
Fields§
§project_type: StringThe type of project (mod, modpack, resourcepack, shader).
downloads: i32The total number of downloads.
project_id: StringThe project’s ID.
The username or team that created the project.
versions: Vec<String>The latest versions available.
follows: i32The number of followers.
date_created: StringDate created (ISO-8601).
date_modified: StringDate last modified (ISO-8601).
license: StringThe project’s license short-ID.
slug: Option<String>The project slug.
title: Option<String>The project title.
description: Option<String>The project description.
categories: Option<Vec<String>>A list of associated categories.
client_side: Option<String>Client-side support.
server_side: Option<String>Server-side support.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SearchHit
impl<'de> Deserialize<'de> for SearchHit
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 ProjectInfo for SearchHit
impl ProjectInfo for SearchHit
fn get_id(&self) -> &str
fn get_slug(&self) -> Option<&str>
fn get_title(&self) -> Option<&str>
fn get_description(&self) -> Option<&str>
fn get_categories(&self) -> Option<&[String]>
fn get_client_side(&self) -> Option<&str>
fn get_server_side(&self) -> Option<&str>
fn get_project_type(&self) -> &str
fn get_downloads(&self) -> i32
fn get_versions(&self) -> &[String]
fn get_followers(&self) -> i32
fn get_date_created(&self) -> &str
fn get_date_modified(&self) -> &str
Auto Trait Implementations§
impl Freeze for SearchHit
impl RefUnwindSafe for SearchHit
impl Send for SearchHit
impl Sync for SearchHit
impl Unpin for SearchHit
impl UnsafeUnpin for SearchHit
impl UnwindSafe for SearchHit
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