diff --git a/docs/api.rst b/docs/api.rst index 1d9b5a097..e61469003 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -61,7 +61,7 @@ Data Structures Owned Types ~~~~~~~~~~~ -TODO: owned type description +See :ref:`owned_types_concept` .. c:type:: z_owned_slice_t @@ -130,7 +130,7 @@ TODO: owned type description Loaned Types ~~~~~~~~~~~ -TODO: loaned type description +See :ref:`loaned_types_concept` .. c:type:: z_loaned_slice_t @@ -199,7 +199,7 @@ TODO: loaned type description View Types ~~~~~~~~~~~ -TODO: view type description +See :ref:`view_types_concept` .. c:type:: z_view_string_t diff --git a/docs/concepts.rst b/docs/concepts.rst index c290dfca3..d39b250f7 100644 --- a/docs/concepts.rst +++ b/docs/concepts.rst @@ -28,6 +28,8 @@ Zenoh-Pico types fall into these categories: - Option structures: `z_xxx_options_t` - Enums and plain data structures: `z_xxx_t` +.. _owned_types_concept: + Owned Types `z_owned_xxx_t` --------------------------- @@ -47,6 +49,8 @@ the `z_drop` macro. Example: Owned objects can be passed to functions in two ways: by moving (`z_moved_xxx_t`) or loaning (`z_loaned_xxx_t`). +.. _loaned_types_concept: + Loaned Types `z_loaned_xxx_t` ----------------------------- @@ -68,6 +72,8 @@ modify (`z_loaned_xxx_t*`) the object. In both cases, ownership remains with the z_drop(z_move(s)); z_drop(z_move(s1)); +.. _moved_types_concept: + Moved types `z_moved_xxx_t` --------------------------- @@ -89,6 +95,8 @@ it's not required. Note that `z_drop` itself takes ownership, so `z_move` is als } // z_drop(z_move(cfg)); // this is safe but useless +.. _view_types_concept: + View Types `z_view_xxx_t` -------------------------