Enum flatpak_rs::source::FlatpakSourceType
source · [−]pub enum FlatpakSourceType {
Archive,
Git,
Bazaar,
Svn,
Dir,
File,
Script,
Shell,
Patch,
ExtraData,
}
Expand description
The Flatpak sources can be of multiple different types, determined
by the type
field. The type of the Flatpak source will determine which
other fields should be populated.
Variants
Archive
Git
Bazaar
Svn
Dir
File
Script
Shell
Patch
ExtraData
Implementations
sourceimpl FlatpakSourceType
impl FlatpakSourceType
sourcepub fn is_code(&self) -> bool
pub fn is_code(&self) -> bool
Determines if a Flatpak source points to a code project. See crate::source::CODE_TYPES for the list of code types.
sourcepub fn is_vcs(&self) -> bool
pub fn is_vcs(&self) -> bool
Determines if a Flatpak source points to a version-control system repository. See crate::source::VCS_TYPES for the list of VCS types.
sourcepub fn supports_mirror_urls(&self) -> bool
pub fn supports_mirror_urls(&self) -> bool
Determines if mirror urls can be used with that source type.
pub fn to_string(&self) -> String
pub fn from_string(source_type: &str) -> Result<FlatpakSourceType, String>
Trait Implementations
sourceimpl Clone for FlatpakSourceType
impl Clone for FlatpakSourceType
sourcefn clone(&self) -> FlatpakSourceType
fn clone(&self) -> FlatpakSourceType
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 FlatpakSourceType
impl Debug for FlatpakSourceType
sourceimpl Default for FlatpakSourceType
impl Default for FlatpakSourceType
sourceimpl<'de> Deserialize<'de> for FlatpakSourceType
impl<'de> Deserialize<'de> for FlatpakSourceType
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 FlatpakSourceType
impl Hash for FlatpakSourceType
impl StructuralPartialEq for FlatpakSourceType
Auto Trait Implementations
impl RefUnwindSafe for FlatpakSourceType
impl Send for FlatpakSourceType
impl Sync for FlatpakSourceType
impl Unpin for FlatpakSourceType
impl UnwindSafe for FlatpakSourceType
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