pub struct VersionFile {
pub hashes: VersionFileHashes,
pub url: String,
pub filename: String,
pub primary: bool,
pub size: i32,
pub file_type: Option<Option<FileType>>,
}
Fields§
§hashes: VersionFileHashes
§url: String
A direct link to the file
filename: String
The name of the file
primary: bool
Whether this file is the primary one for its version. Only a maximum of one file per version will have this set to true. If there are not any primary files, it can be inferred that the first file is the primary one.
size: i32
The size of the file in bytes
file_type: Option<Option<FileType>>
The type of the additional file, used mainly for adding resource packs to datapacks
Implementations§
Source§impl VersionFile
impl VersionFile
pub fn new( hashes: VersionFileHashes, url: String, filename: String, primary: bool, size: i32, ) -> VersionFile
Trait Implementations§
Source§impl Clone for VersionFile
impl Clone for VersionFile
Source§fn clone(&self) -> VersionFile
fn clone(&self) -> VersionFile
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 VersionFile
impl Debug for VersionFile
Source§impl Default for VersionFile
impl Default for VersionFile
Source§fn default() -> VersionFile
fn default() -> VersionFile
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for VersionFile
impl<'de> Deserialize<'de> for VersionFile
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 PartialEq for VersionFile
impl PartialEq for VersionFile
Source§impl Serialize for VersionFile
impl Serialize for VersionFile
impl StructuralPartialEq for VersionFile
Auto Trait Implementations§
impl Freeze for VersionFile
impl RefUnwindSafe for VersionFile
impl Send for VersionFile
impl Sync for VersionFile
impl Unpin for VersionFile
impl UnwindSafe for VersionFile
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