pub fn title(&self) -> Option<String> {
        // Retrieving the bookmark title from Pdfium is a two-step operation. First, we call
        // FPDFBookmark_GetTitle() with a null buffer; this will retrieve the length of
        // the bookmark title in bytes. If the length is zero, then there is no title.

        // If the length is non-zero, then we reserve a byte buffer of the given
        // length and call FPDFBookmark_GetTitle() again with a pointer to the buffer;
        // this will write the bookmark title to the buffer in UTF16-LE format.

        let buffer_length =
            self.bindings
                .FPDFBookmark_GetTitle(self.handle, std::ptr::null_mut(), 0);

        if buffer_length == 0 {
            // No title is defined.

            return None;
        }

        let mut buffer = create_byte_buffer(buffer_length as usize);

        let result = self.bindings.FPDFBookmark_GetTitle(
            self.handle,
            buffer.as_mut_ptr() as *mut c_void,
            buffer_length,
        );

        assert_eq!(result, buffer_length);

        get_string_from_pdfium_utf16le_bytes(buffer)
    }
/// Returns the title of this [PdfBookmark], if any.
Returns the title of this [PdfBookmark], if any.
Returns the title of this [ PdfBookmark ] if any .
pub fn title(&self) -> Option<String> {
        // Retrieving the bookmark title from Pdfium is a two-step operation. First, we call
        // FPDFBookmark_GetTitle() with a null buffer; this will retrieve the length of
        // the bookmark title in bytes. If the length is zero, then there is no title.
        // If the length is non-zero, then we reserve a byte buffer of the given
        // length and call FPDFBookmark_GetTitle() again with a pointer to the buffer;
        // this will write the bookmark title to the buffer in UTF16-LE format.
        let buffer_length =
            self.bindings
                .FPDFBookmark_GetTitle(self.handle, std::ptr::null_mut(), 0);
        if buffer_length == 0 {
            // No title is defined.
            return None;
        }
        let mut buffer = create_byte_buffer(buffer_length as usize);
        let result = self.bindings.FPDFBookmark_GetTitle(
            self.handle,
            buffer.as_mut_ptr() as *mut c_void,
            buffer_length,
        );
        assert_eq!(result, buffer_length);
        get_string_from_pdfium_utf16le_bytes(buffer)
    }
pub fn title ( & self ) -> Option < String > { // Retrieving the bookmark title from Pdfium is a two-step operation. First, we call // FPDFBookmark_GetTitle() with a null buffer; this will retrieve the length of // the bookmark title in bytes. If the length is zero, then there is no title. // If the length is non-zero, then we reserve a byte buffer of the given // length and call FPDFBookmark_GetTitle() again with a pointer to the buffer; // this will write the bookmark title to the buffer in UTF16-LE format. let buffer_length = self . bindings . FPDFBookmark_GetTitle ( self . handle , std :: ptr :: null_mut ( ) , 0 ) ; if buffer_length == 0 { // No title is defined. return None ; } let mut buffer = create_byte_buffer ( buffer_length as usize ) ; let result = self . bindings . FPDFBookmark_GetTitle ( self . handle , buffer . as_mut_ptr ( ) as * mut c_void , buffer_length , ) ; assert_eq ! ( result buffer_length ) ; get_string_from_pdfium_utf16le_bytes ( buffer ) }
Returns the title of this [PdfBookmark], if any.
Returns the title of this [ PdfBookmark ] if any .
&self
&self