diff --git a/src/blob.rs b/src/blob.rs index 670185f..f130449 100644 --- a/src/blob.rs +++ b/src/blob.rs @@ -62,11 +62,13 @@ impl<'a> Blob<'a> { pub fn len(&self) -> usize { (unsafe { sys::hb_blob_get_length(self.0) }) as usize } +} - /// Converts the blob into raw [`sys::hb_blob_t`] object. +impl<'a> Blob<'a> { + /// Converts the blob into raw [`sys::hb_blob_t`] pointer. /// /// This method transfers the ownership of the blob to the caller. It is up to the caller to call - /// [`sys::hb_blob_destroy`] to free the object, or call [`Self::from_raw`] to convert it back into [`Blob`]. + /// [`sys::hb_blob_destroy`] to free the pointer, or call [`Self::from_raw`] to convert it back into [`Blob`]. pub fn into_raw(self) -> *mut sys::hb_blob_t { let ptr = self.0; std::mem::forget(self); @@ -80,7 +82,7 @@ impl<'a> Blob<'a> { self.0 } - /// Constructs a blob from raw [`sys::hb_blob_t`] object. + /// Constructs a blob from raw [`sys::hb_blob_t`] pointer. /// /// # Safety /// The given `blob` pointer must either be constructed by some Harfbuzz function, or be returned from diff --git a/src/font_face.rs b/src/font_face.rs index 4789d25..9610683 100644 --- a/src/font_face.rs +++ b/src/font_face.rs @@ -56,11 +56,13 @@ impl<'a> FontFace<'a> { unsafe { sys::hb_face_collect_unicodes(self.as_raw(), set.as_raw()) }; Ok(set) } +} - /// Converts the font face into raw [`sys::hb_face_t`] object. +impl<'a> FontFace<'a> { + /// Converts the font face into raw [`sys::hb_face_t`] pointer. /// /// This method transfers the ownership of the font face to the caller. It is up to the caller to call - /// [`sys::hb_face_destroy`] to free the object, or call [`Self::from_raw`] to convert it back into [`FontFace`]. + /// [`sys::hb_face_destroy`] to free the pointer, or call [`Self::from_raw`] to convert it back into [`FontFace`]. pub fn into_raw(self) -> *mut sys::hb_face_t { let ptr = self.0; std::mem::forget(self); @@ -74,7 +76,7 @@ impl<'a> FontFace<'a> { self.0 } - /// Constructs a font face from raw [`sys::hb_face_t`] object. + /// Constructs a font face from raw [`sys::hb_face_t`] pointer. /// /// # Safety /// The given `font_face` pointer must either be constructed by some Harfbuzz function, or be returned from diff --git a/src/set.rs b/src/set.rs index c2bec05..b50a49e 100644 --- a/src/set.rs +++ b/src/set.rs @@ -210,10 +210,10 @@ where } impl<'a, T> Set<'a, T> { - /// Converts the set into raw [`sys::hb_set_t`] object. + /// Converts the set into raw [`sys::hb_set_t`] pointer. /// /// This method transfers the ownership of the set to the caller. It is up to the caller to call - /// [`sys::hb_set_destroy`] to free the object, or call [`Self::from_raw`] to convert it back into [`Set`]. + /// [`sys::hb_set_destroy`] to free the pointer, or call [`Self::from_raw`] to convert it back into [`Set`]. pub fn into_raw(self) -> *mut sys::hb_set_t { let ptr = self.0 .0; std::mem::forget(self); @@ -227,7 +227,7 @@ impl<'a, T> Set<'a, T> { self.0 .0 } - /// Constructs a set from raw [`sys::hb_set_t`] object. + /// Constructs a set from raw [`sys::hb_set_t`] pointer. /// /// # Safety /// The given `set` pointer must either be constructed by some Harfbuzz function, or be returned from diff --git a/src/subset.rs b/src/subset.rs index 91ed8b7..668b5de 100644 --- a/src/subset.rs +++ b/src/subset.rs @@ -182,11 +182,13 @@ impl SubsetInput { } Ok(unsafe { FontFace::from_raw(face) }) } +} - /// Converts the subset input into raw [`sys::hb_subset_input_t`] object. +impl SubsetInput { + /// Converts the subset input into raw [`sys::hb_subset_input_t`] pointer. /// /// This method transfers the ownership of the subset input to the caller. It is up to the caller to call - /// [`sys::hb_blob_destroy`] to free the object, or call [`Self::from_raw`] to convert it back into [`SubsetInput`]. + /// [`sys::hb_blob_destroy`] to free the pointer, or call [`Self::from_raw`] to convert it back into [`SubsetInput`]. pub fn into_raw(self) -> *mut sys::hb_subset_input_t { let ptr = self.0; std::mem::forget(self); @@ -200,7 +202,7 @@ impl SubsetInput { self.0 } - /// Constructs a subset input from raw [`sys::hb_subset_input_t`] object. + /// Constructs a subset input from raw [`sys::hb_subset_input_t`] pointer. /// /// # Safety /// The given `subset` pointer must either be constructed by some Harfbuzz function, or be returned from