Skip to content

Commit

Permalink
[#264] Fix doc errors
Browse files Browse the repository at this point in the history
  • Loading branch information
elfenpiff committed Aug 15, 2024
1 parent 026d5fb commit c21c5e9
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 27 deletions.
14 changes: 3 additions & 11 deletions iceoryx2-ffi/ffi/src/api/publish_subscribe_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use super::HandleToType;

// BEGIN types definition

/// Sample header used by [`MessagingPattern::PublishSubscribe`]
/// Sample header used by `MessagingPattern::PublishSubscribe`
#[repr(C)]
#[repr(align(8))] // core::mem::align_of::<Option<Header>>()
pub struct iox2_publish_subscribe_header_storage_t {
Expand All @@ -48,11 +48,11 @@ impl iox2_publish_subscribe_header_t {
}

pub struct iox2_publish_subscribe_header_h_t;
/// The owning handle for `iox2_publish_subscribe_header_t`. Passing the handle to an function transfers the ownership.
/// The owning handle for [`iox2_publish_subscribe_header_t`]. Passing the handle to an function transfers the ownership.
pub type iox2_publish_subscribe_header_h = *mut iox2_publish_subscribe_header_h_t;

pub struct iox2_publish_subscribe_header_ref_h_t;
/// The non-owning handle for `iox2_publish_subscribe_header_t`. Passing the handle to an function does not transfers the ownership.
/// The non-owning handle for [`iox2_publish_subscribe_header_t`]. Passing the handle to an function does not transfers the ownership.
pub type iox2_publish_subscribe_header_ref_h = *mut iox2_publish_subscribe_header_ref_h_t;

// NOTE check the README.md for using opaque types with renaming
Expand Down Expand Up @@ -83,10 +83,6 @@ impl HandleToType for iox2_publish_subscribe_header_ref_h {

/// This function casts an owning [`iox2_publish_subscribe_header_h`] into a non-owning [`iox2_publish_subscribe_header_ref_h`]
///
/// # Arguments
///
/// * `handle` obtained by [`iox2_port_factory_publish_subscribe_header_builder_create`](crate::iox2_port_factory_publish_subscribe_header_builder_create)
///
/// Returns a [`iox2_publish_subscribe_header_ref_h`]
///
/// # Safety
Expand All @@ -104,10 +100,6 @@ pub unsafe extern "C" fn iox2_cast_publish_subscribe_header_ref_h(

/// This function needs to be called to destroy the publish_subscribe_header!
///
/// # Arguments
///
/// * `handle` obtained by [`iox2_port_factory_publish_subscribe_header_builder_create`](crate::iox2_port_factory_publish_subscribe_header_builder_create)
///
/// # Safety
///
/// * The `handle` is invalid after the return of this function and leads to undefined behavior if used in another function call!
Expand Down
8 changes: 4 additions & 4 deletions iceoryx2-ffi/ffi/src/api/unique_listener_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use super::HandleToType;

// BEGIN types definition

/// The system-wide unique id of a [`iox2_listener_t`].
/// The system-wide unique id of a `iox2_listener_t`.
#[repr(C)]
#[repr(align(4))] // core::mem::align_of::<UniqueListenerId>()
pub struct iox2_unique_listener_id_storage_t {
Expand All @@ -46,11 +46,11 @@ impl iox2_unique_listener_id_t {
}

pub struct iox2_unique_listener_id_h_t;
/// The owning handle for `iox2_unique_listener_id_t`. Passing the handle to an function transfers the ownership.
/// The owning handle for [`iox2_unique_listener_id_t`]. Passing the handle to an function transfers the ownership.
pub type iox2_unique_listener_id_h = *mut iox2_unique_listener_id_h_t;

pub struct iox2_unique_listener_id_ref_h_t;
/// The non-owning handle for `iox2_unique_listener_id_t`. Passing the handle to an function does not transfers the ownership.
/// The non-owning handle for [`iox2_unique_listener_id_t`]. Passing the handle to an function does not transfers the ownership.
pub type iox2_unique_listener_id_ref_h = *mut iox2_unique_listener_id_ref_h_t;

impl HandleToType for iox2_unique_listener_id_h {
Expand Down Expand Up @@ -94,7 +94,7 @@ pub unsafe extern "C" fn iox2_unique_listener_id_drop(handle: iox2_unique_listen
/// This function casts an owning [`iox2_unique_listener_id_h`] into a non-owning
/// [`iox2_unique_listener_id_ref_h`]
///
/// Returns a [`iox2_listener_ref_h`]
/// Returns a [`iox2_unique_listener_id_ref_h`]
///
/// # Safety
///
Expand Down
8 changes: 4 additions & 4 deletions iceoryx2-ffi/ffi/src/api/unique_notifier_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use super::HandleToType;

// BEGIN types definition

/// The system-wide unique id of a [`iox2_notifier_t`].
/// The system-wide unique id of a `iox2_notifier_t`.
#[repr(C)]
#[repr(align(4))] // core::mem::align_of::<UniqueNotifierId>()
pub struct iox2_unique_notifier_id_storage_t {
Expand All @@ -46,11 +46,11 @@ impl iox2_unique_notifier_id_t {
}

pub struct iox2_unique_notifier_id_h_t;
/// The owning handle for `iox2_unique_notifier_id_t`. Passing the handle to an function transfers the ownership.
/// The owning handle for [`iox2_unique_notifier_id_t`]. Passing the handle to an function transfers the ownership.
pub type iox2_unique_notifier_id_h = *mut iox2_unique_notifier_id_h_t;

pub struct iox2_unique_notifier_id_ref_h_t;
/// The non-owning handle for `iox2_unique_notifier_id_t`. Passing the handle to an function does not transfers the ownership.
/// The non-owning handle for [`iox2_unique_notifier_id_t`]. Passing the handle to an function does not transfers the ownership.
pub type iox2_unique_notifier_id_ref_h = *mut iox2_unique_notifier_id_ref_h_t;

impl HandleToType for iox2_unique_notifier_id_h {
Expand Down Expand Up @@ -94,7 +94,7 @@ pub unsafe extern "C" fn iox2_unique_notifier_id_drop(handle: iox2_unique_notifi
/// This function casts an owning [`iox2_unique_notifier_id_h`] into a non-owning
/// [`iox2_unique_notifier_id_ref_h`]
///
/// Returns a [`iox2_notifier_ref_h`]
/// Returns a [`iox2_unique_notifier_id_ref_h`]
///
/// # Safety
///
Expand Down
8 changes: 4 additions & 4 deletions iceoryx2-ffi/ffi/src/api/unique_publisher_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use super::HandleToType;

// BEGIN types definition

/// The system-wide unique id of a [`iox2_publisher_t`].
/// The system-wide unique id of a `iox2_publisher_t`.
#[repr(C)]
#[repr(align(4))] // core::mem::align_of::<UniquePublisherId>()
pub struct iox2_unique_publisher_id_storage_t {
Expand All @@ -46,11 +46,11 @@ impl iox2_unique_publisher_id_t {
}

pub struct iox2_unique_publisher_id_h_t;
/// The owning handle for `iox2_unique_publisher_id_t`. Passing the handle to an function transfers the ownership.
/// The owning handle for [`iox2_unique_publisher_id_t`]. Passing the handle to an function transfers the ownership.
pub type iox2_unique_publisher_id_h = *mut iox2_unique_publisher_id_h_t;

pub struct iox2_unique_publisher_id_ref_h_t;
/// The non-owning handle for `iox2_unique_publisher_id_t`. Passing the handle to an function does not transfers the ownership.
/// The non-owning handle for [`iox2_unique_publisher_id_t`]. Passing the handle to an function does not transfers the ownership.
pub type iox2_unique_publisher_id_ref_h = *mut iox2_unique_publisher_id_ref_h_t;

impl HandleToType for iox2_unique_publisher_id_h {
Expand Down Expand Up @@ -94,7 +94,7 @@ pub unsafe extern "C" fn iox2_unique_publisher_id_drop(handle: iox2_unique_publi
/// This function casts an owning [`iox2_unique_publisher_id_h`] into a non-owning
/// [`iox2_unique_publisher_id_ref_h`]
///
/// Returns a [`iox2_publisher_ref_h`]
/// Returns a [`iox2_unique_publisher_id_ref_h`]
///
/// # Safety
///
Expand Down
8 changes: 4 additions & 4 deletions iceoryx2-ffi/ffi/src/api/unique_subscriber_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use super::HandleToType;

// BEGIN types definition

/// The system-wide unique id of a [`iox2_subscriber_t`].
/// The system-wide unique id of a `iox2_subscriber_t`.
#[repr(C)]
#[repr(align(4))] // core::mem::align_of::<UniqueSubscriberId>()
pub struct iox2_unique_subscriber_id_storage_t {
Expand All @@ -46,11 +46,11 @@ impl iox2_unique_subscriber_id_t {
}

pub struct iox2_unique_subscriber_id_h_t;
/// The owning handle for `iox2_unique_subscriber_id_t`. Passing the handle to an function transfers the ownership.
/// The owning handle for [`iox2_unique_subscriber_id_t`]. Passing the handle to an function transfers the ownership.
pub type iox2_unique_subscriber_id_h = *mut iox2_unique_subscriber_id_h_t;

pub struct iox2_unique_subscriber_id_ref_h_t;
/// The non-owning handle for `iox2_unique_subscriber_id_t`. Passing the handle to an function does not transfers the ownership.
/// The non-owning handle for [`iox2_unique_subscriber_id_t`]. Passing the handle to an function does not transfers the ownership.
pub type iox2_unique_subscriber_id_ref_h = *mut iox2_unique_subscriber_id_ref_h_t;

impl HandleToType for iox2_unique_subscriber_id_h {
Expand Down Expand Up @@ -94,7 +94,7 @@ pub unsafe extern "C" fn iox2_unique_subscriber_id_drop(handle: iox2_unique_subs
/// This function casts an owning [`iox2_unique_subscriber_id_h`] into a non-owning
/// [`iox2_unique_subscriber_id_ref_h`]
///
/// Returns a [`iox2_subscriber_ref_h`]
/// Returns a [`iox2_unique_subscriber_id_ref_h`]
///
/// # Safety
///
Expand Down

0 comments on commit c21c5e9

Please sign in to comment.