use bitflags::bitflags;
use glib::translate::*;
use glib::value::FromValue;
use glib::value::ToValue;
use glib::StaticType;
use glib::Type;
use std::fmt;
#[cfg(any(feature = "v2017_13", feature = "dox"))]
bitflags! {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_13")))]
#[doc(alias = "OstreeChecksumFlags")]
pub struct ChecksumFlags: u32 {
#[doc(alias = "OSTREE_CHECKSUM_FLAGS_NONE")]
const NONE = ffi::OSTREE_CHECKSUM_FLAGS_NONE as _;
#[doc(alias = "OSTREE_CHECKSUM_FLAGS_IGNORE_XATTRS")]
const IGNORE_XATTRS = ffi::OSTREE_CHECKSUM_FLAGS_IGNORE_XATTRS as _;
#[doc(alias = "OSTREE_CHECKSUM_FLAGS_CANONICAL_PERMISSIONS")]
const CANONICAL_PERMISSIONS = ffi::OSTREE_CHECKSUM_FLAGS_CANONICAL_PERMISSIONS as _;
}
}
#[cfg(any(feature = "v2017_13", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_13")))]
impl fmt::Display for ChecksumFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
#[cfg(any(feature = "v2017_13", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_13")))]
#[doc(hidden)]
impl IntoGlib for ChecksumFlags {
type GlibType = ffi::OstreeChecksumFlags;
fn into_glib(self) -> ffi::OstreeChecksumFlags {
self.bits()
}
}
#[cfg(any(feature = "v2017_13", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2017_13")))]
#[doc(hidden)]
impl FromGlib<ffi::OstreeChecksumFlags> for ChecksumFlags {
unsafe fn from_glib(value: ffi::OstreeChecksumFlags) -> Self {
Self::from_bits_truncate(value)
}
}
bitflags! {
#[doc(alias = "OstreeDiffFlags")]
pub struct DiffFlags: u32 {
#[doc(alias = "OSTREE_DIFF_FLAGS_NONE")]
const NONE = ffi::OSTREE_DIFF_FLAGS_NONE as _;
#[doc(alias = "OSTREE_DIFF_FLAGS_IGNORE_XATTRS")]
const IGNORE_XATTRS = ffi::OSTREE_DIFF_FLAGS_IGNORE_XATTRS as _;
}
}
impl fmt::Display for DiffFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
#[doc(hidden)]
impl IntoGlib for DiffFlags {
type GlibType = ffi::OstreeDiffFlags;
fn into_glib(self) -> ffi::OstreeDiffFlags {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeDiffFlags> for DiffFlags {
unsafe fn from_glib(value: ffi::OstreeDiffFlags) -> Self {
Self::from_bits_truncate(value)
}
}
bitflags! {
#[doc(alias = "OstreeGpgSignatureFormatFlags")]
pub struct GpgSignatureFormatFlags: u32 {
#[doc(alias = "OSTREE_GPG_SIGNATURE_FORMAT_DEFAULT")]
const GPG_SIGNATURE_FORMAT_DEFAULT = ffi::OSTREE_GPG_SIGNATURE_FORMAT_DEFAULT as _;
}
}
impl fmt::Display for GpgSignatureFormatFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
#[doc(hidden)]
impl IntoGlib for GpgSignatureFormatFlags {
type GlibType = ffi::OstreeGpgSignatureFormatFlags;
fn into_glib(self) -> ffi::OstreeGpgSignatureFormatFlags {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeGpgSignatureFormatFlags> for GpgSignatureFormatFlags {
unsafe fn from_glib(value: ffi::OstreeGpgSignatureFormatFlags) -> Self {
Self::from_bits_truncate(value)
}
}
bitflags! {
#[doc(alias = "OstreeRepoCommitModifierFlags")]
pub struct RepoCommitModifierFlags: u32 {
#[doc(alias = "OSTREE_REPO_COMMIT_MODIFIER_FLAGS_NONE")]
const NONE = ffi::OSTREE_REPO_COMMIT_MODIFIER_FLAGS_NONE as _;
#[doc(alias = "OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SKIP_XATTRS")]
const SKIP_XATTRS = ffi::OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SKIP_XATTRS as _;
#[doc(alias = "OSTREE_REPO_COMMIT_MODIFIER_FLAGS_GENERATE_SIZES")]
const GENERATE_SIZES = ffi::OSTREE_REPO_COMMIT_MODIFIER_FLAGS_GENERATE_SIZES as _;
#[doc(alias = "OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CANONICAL_PERMISSIONS")]
const CANONICAL_PERMISSIONS = ffi::OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CANONICAL_PERMISSIONS as _;
#[doc(alias = "OSTREE_REPO_COMMIT_MODIFIER_FLAGS_ERROR_ON_UNLABELED")]
const ERROR_ON_UNLABELED = ffi::OSTREE_REPO_COMMIT_MODIFIER_FLAGS_ERROR_ON_UNLABELED as _;
#[doc(alias = "OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CONSUME")]
const CONSUME = ffi::OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CONSUME as _;
#[doc(alias = "OSTREE_REPO_COMMIT_MODIFIER_FLAGS_DEVINO_CANONICAL")]
const DEVINO_CANONICAL = ffi::OSTREE_REPO_COMMIT_MODIFIER_FLAGS_DEVINO_CANONICAL as _;
}
}
impl fmt::Display for RepoCommitModifierFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
#[doc(hidden)]
impl IntoGlib for RepoCommitModifierFlags {
type GlibType = ffi::OstreeRepoCommitModifierFlags;
fn into_glib(self) -> ffi::OstreeRepoCommitModifierFlags {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoCommitModifierFlags> for RepoCommitModifierFlags {
unsafe fn from_glib(value: ffi::OstreeRepoCommitModifierFlags) -> Self {
Self::from_bits_truncate(value)
}
}
#[cfg(any(feature = "v2015_7", feature = "dox"))]
bitflags! {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2015_7")))]
#[doc(alias = "OstreeRepoCommitState")]
pub struct RepoCommitState: u32 {
#[doc(alias = "OSTREE_REPO_COMMIT_STATE_NORMAL")]
const NORMAL = ffi::OSTREE_REPO_COMMIT_STATE_NORMAL as _;
#[doc(alias = "OSTREE_REPO_COMMIT_STATE_PARTIAL")]
const PARTIAL = ffi::OSTREE_REPO_COMMIT_STATE_PARTIAL as _;
#[doc(alias = "OSTREE_REPO_COMMIT_STATE_FSCK_PARTIAL")]
const FSCK_PARTIAL = ffi::OSTREE_REPO_COMMIT_STATE_FSCK_PARTIAL as _;
}
}
#[cfg(any(feature = "v2015_7", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2015_7")))]
impl fmt::Display for RepoCommitState {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
#[cfg(any(feature = "v2015_7", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2015_7")))]
#[doc(hidden)]
impl IntoGlib for RepoCommitState {
type GlibType = ffi::OstreeRepoCommitState;
fn into_glib(self) -> ffi::OstreeRepoCommitState {
self.bits()
}
}
#[cfg(any(feature = "v2015_7", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2015_7")))]
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoCommitState> for RepoCommitState {
unsafe fn from_glib(value: ffi::OstreeRepoCommitState) -> Self {
Self::from_bits_truncate(value)
}
}
bitflags! {
#[doc(alias = "OstreeRepoCommitTraverseFlags")]
pub struct RepoCommitTraverseFlags: u32 {
#[doc(alias = "OSTREE_REPO_COMMIT_TRAVERSE_FLAG_NONE")]
const NONE = ffi::OSTREE_REPO_COMMIT_TRAVERSE_FLAG_NONE as _;
#[doc(alias = "OSTREE_REPO_COMMIT_TRAVERSE_FLAG_COMMIT_ONLY")]
const COMMIT_ONLY = ffi::OSTREE_REPO_COMMIT_TRAVERSE_FLAG_COMMIT_ONLY as _;
}
}
impl fmt::Display for RepoCommitTraverseFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
#[doc(hidden)]
impl IntoGlib for RepoCommitTraverseFlags {
type GlibType = ffi::OstreeRepoCommitTraverseFlags;
fn into_glib(self) -> ffi::OstreeRepoCommitTraverseFlags {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoCommitTraverseFlags> for RepoCommitTraverseFlags {
unsafe fn from_glib(value: ffi::OstreeRepoCommitTraverseFlags) -> Self {
Self::from_bits_truncate(value)
}
}
bitflags! {
#[doc(alias = "OstreeRepoListObjectsFlags")]
pub struct RepoListObjectsFlags: u32 {
#[doc(alias = "OSTREE_REPO_LIST_OBJECTS_LOOSE")]
const LOOSE = ffi::OSTREE_REPO_LIST_OBJECTS_LOOSE as _;
#[doc(alias = "OSTREE_REPO_LIST_OBJECTS_PACKED")]
const PACKED = ffi::OSTREE_REPO_LIST_OBJECTS_PACKED as _;
#[doc(alias = "OSTREE_REPO_LIST_OBJECTS_ALL")]
const ALL = ffi::OSTREE_REPO_LIST_OBJECTS_ALL as _;
#[doc(alias = "OSTREE_REPO_LIST_OBJECTS_NO_PARENTS")]
const NO_PARENTS = ffi::OSTREE_REPO_LIST_OBJECTS_NO_PARENTS as _;
}
}
impl fmt::Display for RepoListObjectsFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
#[doc(hidden)]
impl IntoGlib for RepoListObjectsFlags {
type GlibType = ffi::OstreeRepoListObjectsFlags;
fn into_glib(self) -> ffi::OstreeRepoListObjectsFlags {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoListObjectsFlags> for RepoListObjectsFlags {
unsafe fn from_glib(value: ffi::OstreeRepoListObjectsFlags) -> Self {
Self::from_bits_truncate(value)
}
}
bitflags! {
#[doc(alias = "OstreeRepoListRefsExtFlags")]
pub struct RepoListRefsExtFlags: u32 {
#[doc(alias = "OSTREE_REPO_LIST_REFS_EXT_NONE")]
const NONE = ffi::OSTREE_REPO_LIST_REFS_EXT_NONE as _;
#[doc(alias = "OSTREE_REPO_LIST_REFS_EXT_ALIASES")]
const ALIASES = ffi::OSTREE_REPO_LIST_REFS_EXT_ALIASES as _;
#[doc(alias = "OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES")]
const EXCLUDE_REMOTES = ffi::OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES as _;
#[doc(alias = "OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_MIRRORS")]
const EXCLUDE_MIRRORS = ffi::OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_MIRRORS as _;
}
}
impl fmt::Display for RepoListRefsExtFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
#[doc(hidden)]
impl IntoGlib for RepoListRefsExtFlags {
type GlibType = ffi::OstreeRepoListRefsExtFlags;
fn into_glib(self) -> ffi::OstreeRepoListRefsExtFlags {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoListRefsExtFlags> for RepoListRefsExtFlags {
unsafe fn from_glib(value: ffi::OstreeRepoListRefsExtFlags) -> Self {
Self::from_bits_truncate(value)
}
}
bitflags! {
#[doc(alias = "OstreeRepoPruneFlags")]
pub struct RepoPruneFlags: u32 {
#[doc(alias = "OSTREE_REPO_PRUNE_FLAGS_NONE")]
const NONE = ffi::OSTREE_REPO_PRUNE_FLAGS_NONE as _;
#[doc(alias = "OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE")]
const NO_PRUNE = ffi::OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE as _;
#[doc(alias = "OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY")]
const REFS_ONLY = ffi::OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY as _;
#[doc(alias = "OSTREE_REPO_PRUNE_FLAGS_COMMIT_ONLY")]
const COMMIT_ONLY = ffi::OSTREE_REPO_PRUNE_FLAGS_COMMIT_ONLY as _;
}
}
impl fmt::Display for RepoPruneFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
#[doc(hidden)]
impl IntoGlib for RepoPruneFlags {
type GlibType = ffi::OstreeRepoPruneFlags;
fn into_glib(self) -> ffi::OstreeRepoPruneFlags {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoPruneFlags> for RepoPruneFlags {
unsafe fn from_glib(value: ffi::OstreeRepoPruneFlags) -> Self {
Self::from_bits_truncate(value)
}
}
bitflags! {
#[doc(alias = "OstreeRepoPullFlags")]
pub struct RepoPullFlags: u32 {
#[doc(alias = "OSTREE_REPO_PULL_FLAGS_NONE")]
const NONE = ffi::OSTREE_REPO_PULL_FLAGS_NONE as _;
#[doc(alias = "OSTREE_REPO_PULL_FLAGS_MIRROR")]
const MIRROR = ffi::OSTREE_REPO_PULL_FLAGS_MIRROR as _;
#[doc(alias = "OSTREE_REPO_PULL_FLAGS_COMMIT_ONLY")]
const COMMIT_ONLY = ffi::OSTREE_REPO_PULL_FLAGS_COMMIT_ONLY as _;
#[doc(alias = "OSTREE_REPO_PULL_FLAGS_UNTRUSTED")]
const UNTRUSTED = ffi::OSTREE_REPO_PULL_FLAGS_UNTRUSTED as _;
#[doc(alias = "OSTREE_REPO_PULL_FLAGS_BAREUSERONLY_FILES")]
const BAREUSERONLY_FILES = ffi::OSTREE_REPO_PULL_FLAGS_BAREUSERONLY_FILES as _;
#[doc(alias = "OSTREE_REPO_PULL_FLAGS_TRUSTED_HTTP")]
const TRUSTED_HTTP = ffi::OSTREE_REPO_PULL_FLAGS_TRUSTED_HTTP as _;
}
}
impl fmt::Display for RepoPullFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
#[doc(hidden)]
impl IntoGlib for RepoPullFlags {
type GlibType = ffi::OstreeRepoPullFlags;
fn into_glib(self) -> ffi::OstreeRepoPullFlags {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoPullFlags> for RepoPullFlags {
unsafe fn from_glib(value: ffi::OstreeRepoPullFlags) -> Self {
Self::from_bits_truncate(value)
}
}
bitflags! {
#[doc(alias = "OstreeRepoResolveRevExtFlags")]
pub struct RepoResolveRevExtFlags: u32 {
#[doc(alias = "OSTREE_REPO_RESOLVE_REV_EXT_NONE")]
const NONE = ffi::OSTREE_REPO_RESOLVE_REV_EXT_NONE as _;
#[doc(alias = "OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY")]
const LOCAL_ONLY = ffi::OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY as _;
}
}
impl fmt::Display for RepoResolveRevExtFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
#[doc(hidden)]
impl IntoGlib for RepoResolveRevExtFlags {
type GlibType = ffi::OstreeRepoResolveRevExtFlags;
fn into_glib(self) -> ffi::OstreeRepoResolveRevExtFlags {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoResolveRevExtFlags> for RepoResolveRevExtFlags {
unsafe fn from_glib(value: ffi::OstreeRepoResolveRevExtFlags) -> Self {
Self::from_bits_truncate(value)
}
}
#[cfg(any(feature = "v2021_4", feature = "dox"))]
bitflags! {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_4")))]
#[doc(alias = "OstreeRepoVerifyFlags")]
pub struct RepoVerifyFlags: u32 {
#[doc(alias = "OSTREE_REPO_VERIFY_FLAGS_NONE")]
const NONE = ffi::OSTREE_REPO_VERIFY_FLAGS_NONE as _;
#[doc(alias = "OSTREE_REPO_VERIFY_FLAGS_NO_GPG")]
const NO_GPG = ffi::OSTREE_REPO_VERIFY_FLAGS_NO_GPG as _;
#[doc(alias = "OSTREE_REPO_VERIFY_FLAGS_NO_SIGNAPI")]
const NO_SIGNAPI = ffi::OSTREE_REPO_VERIFY_FLAGS_NO_SIGNAPI as _;
}
}
#[cfg(any(feature = "v2021_4", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_4")))]
impl fmt::Display for RepoVerifyFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
#[cfg(any(feature = "v2021_4", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_4")))]
#[doc(hidden)]
impl IntoGlib for RepoVerifyFlags {
type GlibType = ffi::OstreeRepoVerifyFlags;
fn into_glib(self) -> ffi::OstreeRepoVerifyFlags {
self.bits()
}
}
#[cfg(any(feature = "v2021_4", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v2021_4")))]
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoVerifyFlags> for RepoVerifyFlags {
unsafe fn from_glib(value: ffi::OstreeRepoVerifyFlags) -> Self {
Self::from_bits_truncate(value)
}
}
bitflags! {
#[doc(alias = "OstreeSePolicyRestoreconFlags")]
pub struct SePolicyRestoreconFlags: u32 {
#[doc(alias = "OSTREE_SEPOLICY_RESTORECON_FLAGS_NONE")]
const NONE = ffi::OSTREE_SEPOLICY_RESTORECON_FLAGS_NONE as _;
#[doc(alias = "OSTREE_SEPOLICY_RESTORECON_FLAGS_ALLOW_NOLABEL")]
const ALLOW_NOLABEL = ffi::OSTREE_SEPOLICY_RESTORECON_FLAGS_ALLOW_NOLABEL as _;
#[doc(alias = "OSTREE_SEPOLICY_RESTORECON_FLAGS_KEEP_EXISTING")]
const KEEP_EXISTING = ffi::OSTREE_SEPOLICY_RESTORECON_FLAGS_KEEP_EXISTING as _;
}
}
impl fmt::Display for SePolicyRestoreconFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
#[doc(hidden)]
impl IntoGlib for SePolicyRestoreconFlags {
type GlibType = ffi::OstreeSePolicyRestoreconFlags;
fn into_glib(self) -> ffi::OstreeSePolicyRestoreconFlags {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeSePolicyRestoreconFlags> for SePolicyRestoreconFlags {
unsafe fn from_glib(value: ffi::OstreeSePolicyRestoreconFlags) -> Self {
Self::from_bits_truncate(value)
}
}
bitflags! {
#[doc(alias = "OstreeSysrootSimpleWriteDeploymentFlags")]
pub struct SysrootSimpleWriteDeploymentFlags: u32 {
#[doc(alias = "OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NONE")]
const NONE = ffi::OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NONE as _;
#[doc(alias = "OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN")]
const RETAIN = ffi::OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN as _;
#[doc(alias = "OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NOT_DEFAULT")]
const NOT_DEFAULT = ffi::OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NOT_DEFAULT as _;
#[doc(alias = "OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NO_CLEAN")]
const NO_CLEAN = ffi::OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NO_CLEAN as _;
#[doc(alias = "OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN_PENDING")]
const RETAIN_PENDING = ffi::OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN_PENDING as _;
#[doc(alias = "OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN_ROLLBACK")]
const RETAIN_ROLLBACK = ffi::OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN_ROLLBACK as _;
}
}
impl fmt::Display for SysrootSimpleWriteDeploymentFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
#[doc(hidden)]
impl IntoGlib for SysrootSimpleWriteDeploymentFlags {
type GlibType = ffi::OstreeSysrootSimpleWriteDeploymentFlags;
fn into_glib(self) -> ffi::OstreeSysrootSimpleWriteDeploymentFlags {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeSysrootSimpleWriteDeploymentFlags> for SysrootSimpleWriteDeploymentFlags {
unsafe fn from_glib(value: ffi::OstreeSysrootSimpleWriteDeploymentFlags) -> Self {
Self::from_bits_truncate(value)
}
}
bitflags! {
#[doc(alias = "OstreeSysrootUpgraderFlags")]
pub struct SysrootUpgraderFlags: u32 {
#[doc(alias = "OSTREE_SYSROOT_UPGRADER_FLAGS_IGNORE_UNCONFIGURED")]
const IGNORE_UNCONFIGURED = ffi::OSTREE_SYSROOT_UPGRADER_FLAGS_IGNORE_UNCONFIGURED as _;
#[doc(alias = "OSTREE_SYSROOT_UPGRADER_FLAGS_STAGE")]
const STAGE = ffi::OSTREE_SYSROOT_UPGRADER_FLAGS_STAGE as _;
}
}
impl fmt::Display for SysrootUpgraderFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
#[doc(hidden)]
impl IntoGlib for SysrootUpgraderFlags {
type GlibType = ffi::OstreeSysrootUpgraderFlags;
fn into_glib(self) -> ffi::OstreeSysrootUpgraderFlags {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeSysrootUpgraderFlags> for SysrootUpgraderFlags {
unsafe fn from_glib(value: ffi::OstreeSysrootUpgraderFlags) -> Self {
Self::from_bits_truncate(value)
}
}
impl StaticType for SysrootUpgraderFlags {
fn static_type() -> Type {
unsafe { from_glib(ffi::ostree_sysroot_upgrader_flags_get_type()) }
}
}
impl glib::value::ValueType for SysrootUpgraderFlags {
type Type = Self;
}
unsafe impl<'a> FromValue<'a> for SysrootUpgraderFlags {
type Checker = glib::value::GenericValueTypeChecker<Self>;
unsafe fn from_value(value: &'a glib::Value) -> Self {
from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
}
}
impl ToValue for SysrootUpgraderFlags {
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
unsafe {
glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
}
value
}
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
impl From<SysrootUpgraderFlags> for glib::Value {
#[inline]
fn from(v: SysrootUpgraderFlags) -> Self {
ToValue::to_value(&v)
}
}
bitflags! {
#[doc(alias = "OstreeSysrootUpgraderPullFlags")]
pub struct SysrootUpgraderPullFlags: u32 {
#[doc(alias = "OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_NONE")]
const NONE = ffi::OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_NONE as _;
#[doc(alias = "OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_ALLOW_OLDER")]
const ALLOW_OLDER = ffi::OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_ALLOW_OLDER as _;
#[doc(alias = "OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_SYNTHETIC")]
const SYNTHETIC = ffi::OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_SYNTHETIC as _;
}
}
impl fmt::Display for SysrootUpgraderPullFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
#[doc(hidden)]
impl IntoGlib for SysrootUpgraderPullFlags {
type GlibType = ffi::OstreeSysrootUpgraderPullFlags;
fn into_glib(self) -> ffi::OstreeSysrootUpgraderPullFlags {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::OstreeSysrootUpgraderPullFlags> for SysrootUpgraderPullFlags {
unsafe fn from_glib(value: ffi::OstreeSysrootUpgraderPullFlags) -> Self {
Self::from_bits_truncate(value)
}
}