@@ -354,6 +354,64 @@ impl ErrorDomain for KeyFileError {
354354 }
355355}
356356
357+ #[ cfg( any( feature = "v2_50" , feature = "dox" ) ) ]
358+ #[ cfg_attr( feature = "dox" , doc( cfg( feature = "v2_50" ) ) ) ]
359+ #[ derive( Debug , Eq , PartialEq , Ord , PartialOrd , Hash , Clone , Copy ) ]
360+ #[ non_exhaustive]
361+ #[ doc( alias = "GLogWriterOutput" ) ]
362+ pub enum LogWriterOutput {
363+ #[ doc( alias = "G_LOG_WRITER_HANDLED" ) ]
364+ Handled ,
365+ #[ doc( alias = "G_LOG_WRITER_UNHANDLED" ) ]
366+ Unhandled ,
367+ #[ doc( hidden) ]
368+ __Unknown( i32 ) ,
369+ }
370+
371+ #[ cfg( any( feature = "v2_50" , feature = "dox" ) ) ]
372+ #[ cfg_attr( feature = "dox" , doc( cfg( feature = "v2_50" ) ) ) ]
373+ impl fmt:: Display for LogWriterOutput {
374+ fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
375+ write ! (
376+ f,
377+ "LogWriterOutput::{}" ,
378+ match * self {
379+ Self :: Handled => "Handled" ,
380+ Self :: Unhandled => "Unhandled" ,
381+ _ => "Unknown" ,
382+ }
383+ )
384+ }
385+ }
386+
387+ #[ cfg( any( feature = "v2_50" , feature = "dox" ) ) ]
388+ #[ cfg_attr( feature = "dox" , doc( cfg( feature = "v2_50" ) ) ) ]
389+ #[ doc( hidden) ]
390+ impl IntoGlib for LogWriterOutput {
391+ type GlibType = ffi:: GLogWriterOutput ;
392+
393+ fn into_glib ( self ) -> ffi:: GLogWriterOutput {
394+ match self {
395+ Self :: Handled => ffi:: G_LOG_WRITER_HANDLED ,
396+ Self :: Unhandled => ffi:: G_LOG_WRITER_UNHANDLED ,
397+ Self :: __Unknown( value) => value,
398+ }
399+ }
400+ }
401+
402+ #[ cfg( any( feature = "v2_50" , feature = "dox" ) ) ]
403+ #[ cfg_attr( feature = "dox" , doc( cfg( feature = "v2_50" ) ) ) ]
404+ #[ doc( hidden) ]
405+ impl FromGlib < ffi:: GLogWriterOutput > for LogWriterOutput {
406+ unsafe fn from_glib ( value : ffi:: GLogWriterOutput ) -> Self {
407+ match value {
408+ ffi:: G_LOG_WRITER_HANDLED => Self :: Handled ,
409+ ffi:: G_LOG_WRITER_UNHANDLED => Self :: Unhandled ,
410+ value => Self :: __Unknown ( value) ,
411+ }
412+ }
413+ }
414+
357415#[ derive( Debug , Eq , PartialEq , Ord , PartialOrd , Hash , Clone , Copy ) ]
358416#[ non_exhaustive]
359417#[ doc( alias = "GOptionArg" ) ]
0 commit comments