Enum flatpak_rs::archive::FlatpakArchiveType
source · [−]pub enum FlatpakArchiveType {
Rpm,
Tar,
TarGzip,
TarCompress,
TarBzip2,
TarLzip,
TarLzma,
TarLzop,
TarXz,
Zip,
SevenZip,
}
Variants
Rpm
Tar
TarGzip
TarCompress
TarBzip2
TarLzip
TarLzma
TarLzop
TarXz
Zip
SevenZip
Implementations
sourceimpl FlatpakArchiveType
impl FlatpakArchiveType
pub fn to_string(&self) -> String
pub fn from_string(archive_type: &str) -> Result<FlatpakArchiveType, String>
sourcepub fn from_path(path: &str) -> Option<FlatpakArchiveType>
pub fn from_path(path: &str) -> Option<FlatpakArchiveType>
Detects the archive type from a path or a URL, using the extension only.
pub fn serialize<S>(
x: &Option<FlatpakArchiveType>,
s: S
) -> Result<S::Ok, S::Error> where
S: Serializer,
pub fn deserialize<'de, D>(
deserializer: D
) -> Result<Option<FlatpakArchiveType>, D::Error> where
D: Deserializer<'de>,
Trait Implementations
sourceimpl Clone for FlatpakArchiveType
impl Clone for FlatpakArchiveType
sourcefn clone(&self) -> FlatpakArchiveType
fn clone(&self) -> FlatpakArchiveType
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 FlatpakArchiveType
impl Debug for FlatpakArchiveType
sourceimpl Default for FlatpakArchiveType
impl Default for FlatpakArchiveType
sourceimpl<'de> Deserialize<'de> for FlatpakArchiveType
impl<'de> Deserialize<'de> for FlatpakArchiveType
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 FlatpakArchiveType
impl Hash for FlatpakArchiveType
impl StructuralPartialEq for FlatpakArchiveType
Auto Trait Implementations
impl RefUnwindSafe for FlatpakArchiveType
impl Send for FlatpakArchiveType
impl Sync for FlatpakArchiveType
impl Unpin for FlatpakArchiveType
impl UnwindSafe for FlatpakArchiveType
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