Skip to content

Commit

Permalink
Update doc with the links to concepts (#683)
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc authored Sep 19, 2024
1 parent c30a787 commit dd4f3bd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Data Structures
Owned Types
~~~~~~~~~~~

TODO: owned type description
See :ref:`owned_types_concept`

.. c:type:: z_owned_slice_t
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions docs/concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`
---------------------------

Expand All @@ -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`
-----------------------------

Expand All @@ -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`
---------------------------

Expand All @@ -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`
-------------------------

Expand Down

0 comments on commit dd4f3bd

Please sign in to comment.