Add new GLib 0.14 variant types for metadata types

This way it's more convenient for downstream crates like ostree-rs-ext
to convert loaded variants.

TODO: Can we add a feature for the `gvariant` crate and expose via
that too?
This commit is contained in:
Colin Walters committed 2022-05-06 12:53:57 -04:00
1 parent 48e0d334b8
commit 83c829eaad
4 files changed
+38

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
//! Hand written bindings for ostree-core.h
use glib::VariantDict;
/// The type of a commit object: `(a{sv}aya(say)sstayay)`
pub type CommitVariantType = (
VariantDict,
Vec<u8>,
Vec<(String, Vec<u8>)>,
String,
String,
u64,
Vec<u8>,
Vec<u8>,
);
/// The type of a dirtree object: `(a(say)a(sayay))`
pub type TreeVariantType = (Vec<(String, Vec<u8>)>, Vec<(String, Vec<u8>, Vec<u8>)>);
/// The type of a directory metadata object: `(uuua(ayay))`
pub type DirmetaVariantType = (u32, u32, u32, Vec<(Vec<u8>, Vec<u8>)>);
+3
View File
@@ -27,6 +27,9 @@ pub use crate::auto::*;
// handwritten code
mod checksum;
pub use crate::checksum::*;
mod core;
pub use crate::core::*;
#[cfg(any(feature = "v2018_6", feature = "dox"))]
mod collection_ref;
#[cfg(any(feature = "v2018_6", feature = "dox"))]