Skip to content

Commit 1631547

Browse files
committed
Improve doc about Boxed
1 parent cc1f50b commit 1631547

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

glib-macros/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,8 @@ pub fn error_domain_derive(input: TokenStream) -> TokenStream {
530530
}
531531

532532
/// Derive macro for defining a [`BoxedType`]`::type_` function and
533-
/// the [`glib::Value`] traits.
533+
/// the [`glib::Value`] traits. Eventually, the type can be set as `nullable` to
534+
/// get an implemention of `glib::value::ToValueOptional`.
534535
///
535536
/// # Example
536537
///
@@ -539,7 +540,7 @@ pub fn error_domain_derive(input: TokenStream) -> TokenStream {
539540
/// use glib::subclass::prelude::*;
540541
///
541542
/// #[derive(Clone, Debug, PartialEq, Eq, glib::Boxed)]
542-
/// #[boxed_type(name = "MyBoxed")]
543+
/// #[boxed_type(name = "MyBoxed", nullable)]
543544
/// struct MyBoxed(String);
544545
/// ```
545546
///

0 commit comments

Comments
 (0)