pub trait NSData: Sized {
Show 35 methods
// Required methods
unsafe fn initWithBase64EncodedData_options_(
self,
base64Data: *mut Object,
options: NSDataBase64DecodingOptions
) -> *mut Object;
unsafe fn initWithBase64EncodedString_options_(
self,
base64String: *mut Object,
options: NSDataBase64DecodingOptions
) -> *mut Object;
unsafe fn initWithBytes_length_(
self,
bytes: *const c_void,
length: u64
) -> *mut Object;
unsafe fn initWithBytesNoCopy_length_(
self,
bytes: *const c_void,
length: u64
) -> *mut Object;
unsafe fn initWithBytesNoCopy_length_deallocator_(
self,
bytes: *const c_void,
length: u64,
deallocator: *mut Block<(*const c_void, u64), ()>
) -> *mut Object;
unsafe fn initWithBytesNoCopy_length_freeWhenDone_(
self,
bytes: *const c_void,
length: u64,
freeWhenDone: i8
) -> *mut Object;
unsafe fn initWithContentsOfFile_(self, path: *mut Object) -> *mut Object;
unsafe fn initWithContentsOfFile_options_error(
self,
path: *mut Object,
mask: NSDataReadingOptions,
errorPtr: *mut *mut Object
) -> *mut Object;
unsafe fn initWithContentsOfURL_(self, aURL: *mut Object) -> *mut Object;
unsafe fn initWithContentsOfURL_options_error_(
self,
aURL: *mut Object,
mask: NSDataReadingOptions,
errorPtr: *mut *mut Object
) -> *mut Object;
unsafe fn initWithData_(self, data: *mut Object) -> *mut Object;
unsafe fn bytes(self) -> *const c_void;
unsafe fn description(self) -> *mut Object;
unsafe fn enumerateByteRangesUsingBlock_(
self,
block: *mut Block<(*const c_void, NSRange, *mut i8), ()>
);
unsafe fn getBytes_length_(self, buffer: *mut c_void, length: u64);
unsafe fn getBytes_range_(self, buffer: *mut c_void, range: NSRange);
unsafe fn subdataWithRange_(self, range: NSRange) -> *mut Object;
unsafe fn rangeOfData_options_range_(
self,
dataToFind: *mut Object,
options: NSDataSearchOptions,
searchRange: NSRange
) -> NSRange;
unsafe fn base64EncodedDataWithOptions_(
self,
options: NSDataBase64EncodingOptions
) -> *mut Object;
unsafe fn base64EncodedStringWithOptions_(
self,
options: NSDataBase64EncodingOptions
) -> *mut Object;
unsafe fn isEqualToData_(self, otherData: *mut Object) -> *mut Object;
unsafe fn length(self) -> u64;
unsafe fn writeToFile_atomically_(
self,
path: *mut Object,
atomically: i8
) -> i8;
unsafe fn writeToFile_options_error_(
self,
path: *mut Object,
mask: NSDataWritingOptions,
errorPtr: *mut *mut Object
) -> i8;
unsafe fn writeToURL_atomically_(
self,
aURL: *mut Object,
atomically: i8
) -> i8;
unsafe fn writeToURL_options_error_(
self,
aURL: *mut Object,
mask: NSDataWritingOptions,
errorPtr: *mut *mut Object
) -> i8;
// Provided methods
unsafe fn data(_: Self) -> *mut Object { ... }
unsafe fn dataWithBytes_length_(
_: Self,
bytes: *const c_void,
length: u64
) -> *mut Object { ... }
unsafe fn dataWithBytesNoCopy_length_(
_: Self,
bytes: *const c_void,
length: u64
) -> *mut Object { ... }
unsafe fn dataWithBytesNoCopy_length_freeWhenDone_(
_: Self,
bytes: *const c_void,
length: u64,
freeWhenDone: i8
) -> *mut Object { ... }
unsafe fn dataWithContentsOfFile_(_: Self, path: *mut Object) -> *mut Object { ... }
unsafe fn dataWithContentsOfFile_options_error_(
_: Self,
path: *mut Object,
mask: NSDataReadingOptions,
errorPtr: *mut *mut Object
) -> *mut Object { ... }
unsafe fn dataWithContentsOfURL_(_: Self, aURL: *mut Object) -> *mut Object { ... }
unsafe fn dataWithContentsOfURL_options_error_(
_: Self,
aURL: *mut Object,
mask: NSDataReadingOptions,
errorPtr: *mut *mut Object
) -> *mut Object { ... }
unsafe fn dataWithData_(_: Self, aData: *mut Object) -> *mut Object { ... }
}