File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -666,6 +666,9 @@ impl Value {
666
666
}
667
667
}
668
668
669
+ // rustdoc-stripper-ignore-next
670
+ /// Converts a `Value` into a `SendValue`. This fails if `self` does not store a value of type
671
+ /// `T`. It is required for `T` to be `Send` to call this function.
669
672
#[ inline]
670
673
pub fn try_into_send_value < T : Send + StaticType > ( self ) -> Result < SendValue , Self > {
671
674
if self . type_ ( ) . is_a ( T :: static_type ( ) ) {
@@ -675,6 +678,17 @@ impl Value {
675
678
}
676
679
}
677
680
681
+ // rustdoc-stripper-ignore-next
682
+ /// Converts a `Value` into a `SendValue`.
683
+ ///
684
+ /// # Safety
685
+ ///
686
+ /// The type of the value contained in `self` must be `Send`.
687
+ #[ inline]
688
+ pub unsafe fn into_send_value ( self ) -> SendValue {
689
+ SendValue :: unsafe_from ( self . into_raw ( ) )
690
+ }
691
+
678
692
fn content_debug_string ( & self ) -> GString {
679
693
unsafe { from_glib_full ( gobject_ffi:: g_strdup_value_contents ( self . to_glib_none ( ) . 0 ) ) }
680
694
}
You can’t perform that action at this time.
0 commit comments