@@ -530,8 +530,8 @@ pub fn error_domain_derive(input: TokenStream) -> TokenStream {
530
530
}
531
531
532
532
/// Derive macro for defining a [`BoxedType`]`::type_` function and
533
- /// the [`glib::Value`] traits. Eventually , the type can be set as `nullable` to
534
- /// get an implemention of `glib::value::ToValueOptional`.
533
+ /// the [`glib::Value`] traits. Optionally , the type can be marked as
534
+ /// `nullable` to get an implemention of `glib::value::ToValueOptional`.
535
535
///
536
536
/// # Example
537
537
///
@@ -540,8 +540,12 @@ pub fn error_domain_derive(input: TokenStream) -> TokenStream {
540
540
/// use glib::subclass::prelude::*;
541
541
///
542
542
/// #[derive(Clone, Debug, PartialEq, Eq, glib::Boxed)]
543
- /// #[boxed_type(name = "MyBoxed", nullable )]
543
+ /// #[boxed_type(name = "MyBoxed")]
544
544
/// struct MyBoxed(String);
545
+ ///
546
+ /// #[derive(Clone, Debug, PartialEq, Eq, glib::Boxed)]
547
+ /// #[boxed_type(name = "MyNullableBoxed", nullable)]
548
+ /// struct MyNullableBoxed(String);
545
549
/// ```
546
550
///
547
551
/// [`BoxedType`]: ../glib/subclass/boxed/trait.BoxedType.html
@@ -555,7 +559,8 @@ pub fn boxed_derive(input: TokenStream) -> TokenStream {
555
559
}
556
560
557
561
/// Derive macro for defining a [`SharedType`]`::get_type` function and
558
- /// the [`glib::Value`] traits.
562
+ /// the [`glib::Value`] traits. Optionally, the type can be marked as
563
+ /// `nullable` to get an implemention of `glib::value::ToValueOptional`.
559
564
///
560
565
/// # Example
561
566
///
@@ -567,9 +572,14 @@ pub fn boxed_derive(input: TokenStream) -> TokenStream {
567
572
/// struct MySharedInner {
568
573
/// foo: String,
569
574
/// }
575
+ ///
570
576
/// #[derive(Clone, Debug, PartialEq, Eq, glib::SharedBoxed)]
571
577
/// #[shared_boxed_type(name = "MySharedBoxed")]
572
- /// struct MyShared(std::sync::Arc<MySharedInner>);
578
+ /// struct MySharedBoxed(std::sync::Arc<MySharedInner>);
579
+ ///
580
+ /// #[derive(Clone, Debug, PartialEq, Eq, glib::SharedBoxed)]
581
+ /// #[shared_boxed_type(name = "MyNullableSharedBoxed", nullable)]
582
+ /// struct MyNullableSharedBoxed(std::sync::Arc<MySharedInner>);
573
583
/// ```
574
584
///
575
585
/// [`SharedType`]: ../glib/subclass/shared/trait.SharedType.html
0 commit comments