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>
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
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 · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more