pub fn data(&self) -> &[u8] {
        unsafe {
            let buffer = ffi::PyBytes_AsString(self.as_ptr()) as *const u8;
            let length = ffi::PyBytes_Size(self.as_ptr()) as usize;
            std::slice::from_raw_parts(buffer, length)
        }
    }
/// Gets the Python string data as byte slice.
Gets the Python string data as byte slice.
Gets the Python string data as byte slice .
pub fn data(&self) -> &[u8] {
        unsafe {
            let buffer = ffi::PyBytes_AsString(self.as_ptr()) as *const u8;
            let length = ffi::PyBytes_Size(self.as_ptr()) as usize;
            std::slice::from_raw_parts(buffer, length)
        }
    }
pub fn data ( & self ) -> & [ u8 ] { unsafe { let buffer = ffi :: PyBytes_AsString ( self . as_ptr ( ) ) as * const u8 ; let length = ffi :: PyBytes_Size ( self . as_ptr ( ) ) as usize ; std :: slice :: from_raw_parts ( buffer , length ) } }
Gets the Python string data as byte slice.
Gets the Python string data as byte slice .
&self
&self