// This file was generated by gir (https://github.com/gtk-rs/gir) // from // from gir-files (https://github.com/gtk-rs/gir-files.git) // DO NOT EDIT use glib::{bitflags::bitflags, prelude::*, translate::*}; bitflags! { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] #[doc(alias = "SecretCollectionCreateFlags")] pub struct CollectionCreateFlags: u32 { #[doc(alias = "SECRET_COLLECTION_CREATE_NONE")] const NONE = ffi::SECRET_COLLECTION_CREATE_NONE as _; } } #[doc(hidden)] impl IntoGlib for CollectionCreateFlags { type GlibType = ffi::SecretCollectionCreateFlags; #[inline] fn into_glib(self) -> ffi::SecretCollectionCreateFlags { self.bits() } } #[doc(hidden)] impl FromGlib for CollectionCreateFlags { #[inline] unsafe fn from_glib(value: ffi::SecretCollectionCreateFlags) -> Self { Self::from_bits_truncate(value) } } impl StaticType for CollectionCreateFlags { #[inline] #[doc(alias = "secret_collection_create_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::secret_collection_create_flags_get_type()) } } } impl glib::HasParamSpec for CollectionCreateFlags { type ParamSpec = glib::ParamSpecFlags; type SetValue = Self; type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder } } impl glib::value::ValueType for CollectionCreateFlags { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for CollectionCreateFlags { type Checker = glib::value::GenericValueTypeChecker; #[inline] 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 CollectionCreateFlags { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: CollectionCreateFlags) -> Self { ToValue::to_value(&v) } } bitflags! { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] #[doc(alias = "SecretCollectionFlags")] pub struct CollectionFlags: u32 { #[doc(alias = "SECRET_COLLECTION_NONE")] const NONE = ffi::SECRET_COLLECTION_NONE as _; #[doc(alias = "SECRET_COLLECTION_LOAD_ITEMS")] const LOAD_ITEMS = ffi::SECRET_COLLECTION_LOAD_ITEMS as _; } } #[doc(hidden)] impl IntoGlib for CollectionFlags { type GlibType = ffi::SecretCollectionFlags; #[inline] fn into_glib(self) -> ffi::SecretCollectionFlags { self.bits() } } #[doc(hidden)] impl FromGlib for CollectionFlags { #[inline] unsafe fn from_glib(value: ffi::SecretCollectionFlags) -> Self { Self::from_bits_truncate(value) } } impl StaticType for CollectionFlags { #[inline] #[doc(alias = "secret_collection_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::secret_collection_flags_get_type()) } } } impl glib::HasParamSpec for CollectionFlags { type ParamSpec = glib::ParamSpecFlags; type SetValue = Self; type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder } } impl glib::value::ValueType for CollectionFlags { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for CollectionFlags { type Checker = glib::value::GenericValueTypeChecker; #[inline] 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 CollectionFlags { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: CollectionFlags) -> Self { ToValue::to_value(&v) } } bitflags! { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] #[doc(alias = "SecretItemCreateFlags")] pub struct ItemCreateFlags: u32 { #[doc(alias = "SECRET_ITEM_CREATE_NONE")] const NONE = ffi::SECRET_ITEM_CREATE_NONE as _; #[doc(alias = "SECRET_ITEM_CREATE_REPLACE")] const REPLACE = ffi::SECRET_ITEM_CREATE_REPLACE as _; } } #[doc(hidden)] impl IntoGlib for ItemCreateFlags { type GlibType = ffi::SecretItemCreateFlags; #[inline] fn into_glib(self) -> ffi::SecretItemCreateFlags { self.bits() } } #[doc(hidden)] impl FromGlib for ItemCreateFlags { #[inline] unsafe fn from_glib(value: ffi::SecretItemCreateFlags) -> Self { Self::from_bits_truncate(value) } } impl StaticType for ItemCreateFlags { #[inline] #[doc(alias = "secret_item_create_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::secret_item_create_flags_get_type()) } } } impl glib::HasParamSpec for ItemCreateFlags { type ParamSpec = glib::ParamSpecFlags; type SetValue = Self; type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder } } impl glib::value::ValueType for ItemCreateFlags { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for ItemCreateFlags { type Checker = glib::value::GenericValueTypeChecker; #[inline] 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 ItemCreateFlags { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: ItemCreateFlags) -> Self { ToValue::to_value(&v) } } bitflags! { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] #[doc(alias = "SecretItemFlags")] pub struct ItemFlags: u32 { #[doc(alias = "SECRET_ITEM_NONE")] const NONE = ffi::SECRET_ITEM_NONE as _; #[doc(alias = "SECRET_ITEM_LOAD_SECRET")] const LOAD_SECRET = ffi::SECRET_ITEM_LOAD_SECRET as _; } } #[doc(hidden)] impl IntoGlib for ItemFlags { type GlibType = ffi::SecretItemFlags; #[inline] fn into_glib(self) -> ffi::SecretItemFlags { self.bits() } } #[doc(hidden)] impl FromGlib for ItemFlags { #[inline] unsafe fn from_glib(value: ffi::SecretItemFlags) -> Self { Self::from_bits_truncate(value) } } impl StaticType for ItemFlags { #[inline] #[doc(alias = "secret_item_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::secret_item_flags_get_type()) } } } impl glib::HasParamSpec for ItemFlags { type ParamSpec = glib::ParamSpecFlags; type SetValue = Self; type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder } } impl glib::value::ValueType for ItemFlags { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for ItemFlags { type Checker = glib::value::GenericValueTypeChecker; #[inline] 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 ItemFlags { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: ItemFlags) -> Self { ToValue::to_value(&v) } } bitflags! { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] #[doc(alias = "SecretSchemaFlags")] pub struct SchemaFlags: u32 { #[doc(alias = "SECRET_SCHEMA_NONE")] const NONE = ffi::SECRET_SCHEMA_NONE as _; #[doc(alias = "SECRET_SCHEMA_DONT_MATCH_NAME")] const DONT_MATCH_NAME = ffi::SECRET_SCHEMA_DONT_MATCH_NAME as _; } } #[doc(hidden)] impl IntoGlib for SchemaFlags { type GlibType = ffi::SecretSchemaFlags; #[inline] fn into_glib(self) -> ffi::SecretSchemaFlags { self.bits() } } #[doc(hidden)] impl FromGlib for SchemaFlags { #[inline] unsafe fn from_glib(value: ffi::SecretSchemaFlags) -> Self { Self::from_bits_truncate(value) } } impl StaticType for SchemaFlags { #[inline] #[doc(alias = "secret_schema_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::secret_schema_flags_get_type()) } } } impl glib::HasParamSpec for SchemaFlags { type ParamSpec = glib::ParamSpecFlags; type SetValue = Self; type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder } } impl glib::value::ValueType for SchemaFlags { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for SchemaFlags { type Checker = glib::value::GenericValueTypeChecker; #[inline] 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 SchemaFlags { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: SchemaFlags) -> Self { ToValue::to_value(&v) } } bitflags! { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] #[doc(alias = "SecretSearchFlags")] pub struct SearchFlags: u32 { #[doc(alias = "SECRET_SEARCH_NONE")] const NONE = ffi::SECRET_SEARCH_NONE as _; #[doc(alias = "SECRET_SEARCH_ALL")] const ALL = ffi::SECRET_SEARCH_ALL as _; #[doc(alias = "SECRET_SEARCH_UNLOCK")] const UNLOCK = ffi::SECRET_SEARCH_UNLOCK as _; #[doc(alias = "SECRET_SEARCH_LOAD_SECRETS")] const LOAD_SECRETS = ffi::SECRET_SEARCH_LOAD_SECRETS as _; } } #[doc(hidden)] impl IntoGlib for SearchFlags { type GlibType = ffi::SecretSearchFlags; #[inline] fn into_glib(self) -> ffi::SecretSearchFlags { self.bits() } } #[doc(hidden)] impl FromGlib for SearchFlags { #[inline] unsafe fn from_glib(value: ffi::SecretSearchFlags) -> Self { Self::from_bits_truncate(value) } } impl StaticType for SearchFlags { #[inline] #[doc(alias = "secret_search_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::secret_search_flags_get_type()) } } } impl glib::HasParamSpec for SearchFlags { type ParamSpec = glib::ParamSpecFlags; type SetValue = Self; type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder } } impl glib::value::ValueType for SearchFlags { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for SearchFlags { type Checker = glib::value::GenericValueTypeChecker; #[inline] 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 SearchFlags { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: SearchFlags) -> Self { ToValue::to_value(&v) } } bitflags! { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] #[doc(alias = "SecretServiceFlags")] pub struct ServiceFlags: u32 { #[doc(alias = "SECRET_SERVICE_NONE")] const NONE = ffi::SECRET_SERVICE_NONE as _; #[doc(alias = "SECRET_SERVICE_OPEN_SESSION")] const OPEN_SESSION = ffi::SECRET_SERVICE_OPEN_SESSION as _; #[doc(alias = "SECRET_SERVICE_LOAD_COLLECTIONS")] const LOAD_COLLECTIONS = ffi::SECRET_SERVICE_LOAD_COLLECTIONS as _; } } #[doc(hidden)] impl IntoGlib for ServiceFlags { type GlibType = ffi::SecretServiceFlags; #[inline] fn into_glib(self) -> ffi::SecretServiceFlags { self.bits() } } #[doc(hidden)] impl FromGlib for ServiceFlags { #[inline] unsafe fn from_glib(value: ffi::SecretServiceFlags) -> Self { Self::from_bits_truncate(value) } } impl StaticType for ServiceFlags { #[inline] #[doc(alias = "secret_service_flags_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::secret_service_flags_get_type()) } } } impl glib::HasParamSpec for ServiceFlags { type ParamSpec = glib::ParamSpecFlags; type SetValue = Self; type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder } } impl glib::value::ValueType for ServiceFlags { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for ServiceFlags { type Checker = glib::value::GenericValueTypeChecker; #[inline] 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 ServiceFlags { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: ServiceFlags) -> Self { ToValue::to_value(&v) } }