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§
Implementations§
Source§impl 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>
pub fn serialize<S>(
x: &Option<FlatpakSourceType>,
s: S,
) -> Result<S::Ok, S::Error>where
S: Serializer,
pub fn deserialization<'de, D>(
deserializer: D,
) -> Result<Option<FlatpakSourceType>, D::Error>where
D: Deserializer<'de>,
Trait Implementations§
Source§impl Clone for FlatpakSourceType
impl Clone for FlatpakSourceType
Source§fn clone(&self) -> FlatpakSourceType
fn clone(&self) -> FlatpakSourceType
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 FlatpakSourceType
impl Debug for FlatpakSourceType
Source§impl Default for FlatpakSourceType
impl Default for FlatpakSourceType
Source§impl<'de> Deserialize<'de> for FlatpakSourceType
impl<'de> Deserialize<'de> for FlatpakSourceType
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 Hash for FlatpakSourceType
impl Hash for FlatpakSourceType
Source§impl PartialEq for FlatpakSourceType
impl PartialEq for FlatpakSourceType
impl StructuralPartialEq for FlatpakSourceType
Auto Trait Implementations§
impl Freeze for FlatpakSourceType
impl RefUnwindSafe for FlatpakSourceType
impl Send for FlatpakSourceType
impl Sync for FlatpakSourceType
impl Unpin for FlatpakSourceType
impl UnwindSafe for FlatpakSourceType
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