Struct flatpak_rs::source::FlatpakSource
source · [−]pub struct FlatpakSource {Show 32 fields
pub type: Option<FlatpakSourceType>,
pub commands: Option<Vec<String>>,
pub dest_filename: Option<String>,
pub filename: Option<String>,
pub url: Option<String>,
pub mirror_urls: Option<Vec<String>>,
pub md5: Option<String>,
pub sha1: Option<String>,
pub sha256: Option<String>,
pub sha512: Option<String>,
pub size: Option<i64>,
pub git_init: Option<bool>,
pub installed_size: Option<i64>,
pub revision: Option<String>,
pub branch: Option<String>,
pub archive_type: Option<FlatpakArchiveType>,
pub commit: Option<String>,
pub tag: Option<String>,
pub path: Option<String>,
pub paths: Option<Vec<String>>,
pub use_git: Option<bool>,
pub use_git_am: Option<bool>,
pub options: Option<Vec<String>>,
pub disable_fsckobjects: Option<bool>,
pub disable_shallow_clone: Option<bool>,
pub disable_submodules: Option<bool>,
pub strip_components: Option<i64>,
pub skip: Option<Vec<String>>,
pub only_arches: Option<Vec<String>>,
pub skip_arches: Option<Vec<String>>,
pub dest: Option<String>,
pub x_checker_data: Option<FlatpakDataCheckerConfig>,
}
Expand description
These contain a pointer to the source that will be extracted into the source directory before the build starts. They can be of several types, distinguished by the type property.
Fields
type: Option<FlatpakSourceType>
Defines the type of the source description.
commands: Option<Vec<String>>
An array of shell commands. types: script, shell
dest_filename: Option<String>
Filename to use inside the source dir. types: script, archive, file
filename: Option<String>
The name to use for the downloaded extra data types: extra-data
url: Option<String>
The url to the resource. types: extra-data, svn, bzr, git, archive, file
mirror_urls: Option<Vec<String>>
A list of alternative urls that are used if the main url fails. types: archive, file
md5: Option<String>
The md5 checksum of the file, verified after download Note that md5 is no longer considered a safe checksum, we recommend you use at least sha256. types: archive, file
sha1: Option<String>
The sha1 checksum of the file, verified after download Note that sha1 is no longer considered a safe checksum, we recommend you use at least sha256. types: archive, file
sha256: Option<String>
The sha256 of the resource. types: extra-data, archive, file
sha512: Option<String>
The sha512 checksum of the file, verified after download types: archive, file
size: Option<i64>
The size of the extra data in bytes. types: extra-data
git_init: Option<bool>
Whether to initialise the repository as a git repository. types: archive
installed_size: Option<i64>
The extra installed size this adds to the app (optional). types: extra-data
revision: Option<String>
A specific revision number to use types: svn, bzr
branch: Option<String>
The branch to use from the git repository types: git
archive_type: Option<FlatpakArchiveType>
The type of archive if it cannot be guessed from the path. types: archive
commit: Option<String>
The commit to use from the git repository. If branch is also specified, then it is verified that the branch/tag is at this specific commit. This is a readable way to document that you’re using a particular tag, but verify that it does not change. types: git
tag: Option<String>
The tag to use from the git repository types: git
path: Option<String>
The path to associated with the resource. types: git, archive, dir, patch, file
paths: Option<Vec<String>>
An list of paths to a patch files that will be applied in the source dir, in order types: patch
use_git: Option<bool>
Whether to use “git apply” rather than “patch” to apply the patch, required when the patch file contains binary diffs. types: patch
use_git_am: Option<bool>
Whether to use “git am” rather than “patch” to apply the patch, required when the patch file contains binary diffs. You cannot use this at the same time as use-git. types: patch
options: Option<Vec<String>>
Extra options to pass to the patch command. types: patch
disable_fsckobjects: Option<bool>
Don’t use transfer.fsckObjects=1 to mirror git repository. This may be needed for some (broken) repositories. types: git
disable_shallow_clone: Option<bool>
Don’t optimize by making a shallow clone when downloading the git repo. types: git
disable_submodules: Option<bool>
Don’t checkout the git submodules when cloning the repository. types: git
strip_components: Option<i64>
The number of initial pathname components to strip. defaults to 1. types: archive, patch
skip: Option<Vec<String>>
Source files to ignore in the directory. types: dir
only_arches: Option<Vec<String>>
If non-empty, only build the module on the arches listed. types: all
skip_arches: Option<Vec<String>>
Don’t build on any of the arches listed. types: all
dest: Option<String>
Directory inside the source dir where this source will be extracted. types: all
x_checker_data: Option<FlatpakDataCheckerConfig>
Implementations
sourceimpl FlatpakSource
impl FlatpakSource
sourcepub fn get_type(&self) -> Option<FlatpakSourceType>
pub fn get_type(&self) -> Option<FlatpakSourceType>
Get the type for the Flatpak source.
pub fn file_path_matches(path: &str) -> bool
pub fn load_from_file(path: String) -> Result<Vec<FlatpakSource>, String>
pub fn parse(
format: FlatpakManifestFormat,
manifest_content: &str
) -> Result<FlatpakSource, String>
pub fn parse_many(
format: FlatpakManifestFormat,
manifest_content: &str
) -> Result<Vec<FlatpakSource>, String>
pub fn is_valid(&self) -> Result<(), String>
pub fn get_url(&self) -> Option<String>
pub fn get_all_mirror_urls(&self) -> Vec<String>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn get_all_urls(&self) -> Vec<String>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn get_type_name(&self) -> String
pub fn supports_mirror_urls(&self) -> bool
Trait Implementations
sourceimpl Clone for FlatpakSource
impl Clone for FlatpakSource
sourcefn clone(&self) -> FlatpakSource
fn clone(&self) -> FlatpakSource
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for FlatpakSource
impl Debug for FlatpakSource
sourceimpl Default for FlatpakSource
impl Default for FlatpakSource
sourcefn default() -> FlatpakSource
fn default() -> FlatpakSource
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for FlatpakSource
impl<'de> Deserialize<'de> for FlatpakSource
sourcefn 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
sourceimpl Hash for FlatpakSource
impl Hash for FlatpakSource
sourceimpl Serialize for FlatpakSource
impl Serialize for FlatpakSource
Auto Trait Implementations
impl RefUnwindSafe for FlatpakSource
impl Send for FlatpakSource
impl Sync for FlatpakSource
impl Unpin for FlatpakSource
impl UnwindSafe for FlatpakSource
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more