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 { ... }
}๐Deprecated: use the objc2-foundation crate instead
Required Methodsยง
unsafe fn initWithBase64EncodedData_options_( self, base64Data: *mut Object, options: NSDataBase64DecodingOptions, ) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
unsafe fn initWithBase64EncodedString_options_( self, base64String: *mut Object, options: NSDataBase64DecodingOptions, ) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
unsafe fn initWithBytes_length_( self, bytes: *const c_void, length: u64, ) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
unsafe fn initWithBytesNoCopy_length_( self, bytes: *const c_void, length: u64, ) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
unsafe fn initWithBytesNoCopy_length_deallocator_( self, bytes: *const c_void, length: u64, deallocator: *mut Block<(*const c_void, u64), ()>, ) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
unsafe fn initWithBytesNoCopy_length_freeWhenDone_( self, bytes: *const c_void, length: u64, freeWhenDone: i8, ) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
unsafe fn initWithContentsOfFile_(self, path: *mut Object) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
unsafe fn initWithContentsOfFile_options_error( self, path: *mut Object, mask: NSDataReadingOptions, errorPtr: *mut *mut Object, ) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
unsafe fn initWithContentsOfURL_(self, aURL: *mut Object) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
unsafe fn initWithContentsOfURL_options_error_( self, aURL: *mut Object, mask: NSDataReadingOptions, errorPtr: *mut *mut Object, ) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
unsafe fn initWithData_(self, data: *mut Object) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
unsafe fn bytes(self) -> *const c_void
๐Deprecated: use the objc2-foundation crate instead
unsafe fn description(self) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
unsafe fn enumerateByteRangesUsingBlock_( self, block: *mut Block<(*const c_void, NSRange, *mut i8), ()>, )
๐Deprecated: use the objc2-foundation crate instead
unsafe fn getBytes_length_(self, buffer: *mut c_void, length: u64)
๐Deprecated: use the objc2-foundation crate instead
unsafe fn getBytes_range_(self, buffer: *mut c_void, range: NSRange)
๐Deprecated: use the objc2-foundation crate instead
unsafe fn subdataWithRange_(self, range: NSRange) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
unsafe fn rangeOfData_options_range_( self, dataToFind: *mut Object, options: NSDataSearchOptions, searchRange: NSRange, ) -> NSRange
๐Deprecated: use the objc2-foundation crate instead
unsafe fn base64EncodedDataWithOptions_( self, options: NSDataBase64EncodingOptions, ) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
unsafe fn base64EncodedStringWithOptions_( self, options: NSDataBase64EncodingOptions, ) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
unsafe fn isEqualToData_(self, otherData: *mut Object) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
unsafe fn length(self) -> u64
๐Deprecated: use the objc2-foundation crate instead
unsafe fn writeToFile_atomically_(self, path: *mut Object, atomically: i8) -> i8
๐Deprecated: use the objc2-foundation crate instead
unsafe fn writeToFile_options_error_( self, path: *mut Object, mask: NSDataWritingOptions, errorPtr: *mut *mut Object, ) -> i8
๐Deprecated: use the objc2-foundation crate instead
unsafe fn writeToURL_atomically_(self, aURL: *mut Object, atomically: i8) -> i8
๐Deprecated: use the objc2-foundation crate instead
unsafe fn writeToURL_options_error_( self, aURL: *mut Object, mask: NSDataWritingOptions, errorPtr: *mut *mut Object, ) -> i8
๐Deprecated: use the objc2-foundation crate instead
Provided Methodsยง
unsafe fn data(_: Self) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
unsafe fn dataWithBytes_length_( _: Self, bytes: *const c_void, length: u64, ) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
unsafe fn dataWithBytesNoCopy_length_( _: Self, bytes: *const c_void, length: u64, ) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
unsafe fn dataWithBytesNoCopy_length_freeWhenDone_( _: Self, bytes: *const c_void, length: u64, freeWhenDone: i8, ) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
unsafe fn dataWithContentsOfFile_(_: Self, path: *mut Object) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
unsafe fn dataWithContentsOfFile_options_error_( _: Self, path: *mut Object, mask: NSDataReadingOptions, errorPtr: *mut *mut Object, ) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
unsafe fn dataWithContentsOfURL_(_: Self, aURL: *mut Object) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
unsafe fn dataWithContentsOfURL_options_error_( _: Self, aURL: *mut Object, mask: NSDataReadingOptions, errorPtr: *mut *mut Object, ) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
unsafe fn dataWithData_(_: Self, aData: *mut Object) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
Dyn Compatibilityยง
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Typesยง
Sourceยงimpl NSData for *mut Object
impl NSData for *mut Object
Sourceยงunsafe fn initWithBase64EncodedData_options_(
self,
base64Data: *mut Object,
options: NSDataBase64DecodingOptions,
) -> *mut Object
unsafe fn initWithBase64EncodedData_options_( self, base64Data: *mut Object, options: NSDataBase64DecodingOptions, ) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
Sourceยงunsafe fn initWithBase64EncodedString_options_(
self,
base64String: *mut Object,
options: NSDataBase64DecodingOptions,
) -> *mut Object
unsafe fn initWithBase64EncodedString_options_( self, base64String: *mut Object, options: NSDataBase64DecodingOptions, ) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
Sourceยงunsafe fn initWithBytes_length_(
self,
bytes: *const c_void,
length: u64,
) -> *mut Object
unsafe fn initWithBytes_length_( self, bytes: *const c_void, length: u64, ) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
Sourceยงunsafe fn initWithBytesNoCopy_length_(
self,
bytes: *const c_void,
length: u64,
) -> *mut Object
unsafe fn initWithBytesNoCopy_length_( self, bytes: *const c_void, length: u64, ) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
Sourceยง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_deallocator_( self, bytes: *const c_void, length: u64, deallocator: *mut Block<(*const c_void, u64), ()>, ) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
Sourceยงunsafe fn initWithBytesNoCopy_length_freeWhenDone_(
self,
bytes: *const c_void,
length: u64,
freeWhenDone: i8,
) -> *mut Object
unsafe fn initWithBytesNoCopy_length_freeWhenDone_( self, bytes: *const c_void, length: u64, freeWhenDone: i8, ) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
Sourceยงunsafe fn initWithContentsOfFile_(self, path: *mut Object) -> *mut Object
unsafe fn initWithContentsOfFile_(self, path: *mut Object) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
Sourceยงunsafe fn initWithContentsOfFile_options_error(
self,
path: *mut Object,
mask: NSDataReadingOptions,
errorPtr: *mut *mut Object,
) -> *mut Object
unsafe fn initWithContentsOfFile_options_error( self, path: *mut Object, mask: NSDataReadingOptions, errorPtr: *mut *mut Object, ) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
Sourceยงunsafe fn initWithContentsOfURL_(self, aURL: *mut Object) -> *mut Object
unsafe fn initWithContentsOfURL_(self, aURL: *mut Object) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
Sourceยงunsafe fn initWithContentsOfURL_options_error_(
self,
aURL: *mut Object,
mask: NSDataReadingOptions,
errorPtr: *mut *mut Object,
) -> *mut Object
unsafe fn initWithContentsOfURL_options_error_( self, aURL: *mut Object, mask: NSDataReadingOptions, errorPtr: *mut *mut Object, ) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
Sourceยงunsafe fn initWithData_(self, data: *mut Object) -> *mut Object
unsafe fn initWithData_(self, data: *mut Object) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
Sourceยงunsafe fn bytes(self) -> *const c_void
unsafe fn bytes(self) -> *const c_void
๐Deprecated: use the objc2-foundation crate instead
Sourceยงunsafe fn description(self) -> *mut Object
unsafe fn description(self) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
Sourceยงunsafe fn enumerateByteRangesUsingBlock_(
self,
block: *mut Block<(*const c_void, NSRange, *mut i8), ()>,
)
unsafe fn enumerateByteRangesUsingBlock_( self, block: *mut Block<(*const c_void, NSRange, *mut i8), ()>, )
๐Deprecated: use the objc2-foundation crate instead
Sourceยงunsafe fn getBytes_length_(self, buffer: *mut c_void, length: u64)
unsafe fn getBytes_length_(self, buffer: *mut c_void, length: u64)
๐Deprecated: use the objc2-foundation crate instead
Sourceยงunsafe fn getBytes_range_(self, buffer: *mut c_void, range: NSRange)
unsafe fn getBytes_range_(self, buffer: *mut c_void, range: NSRange)
๐Deprecated: use the objc2-foundation crate instead
Sourceยงunsafe fn subdataWithRange_(self, range: NSRange) -> *mut Object
unsafe fn subdataWithRange_(self, range: NSRange) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
Sourceยงunsafe fn rangeOfData_options_range_(
self,
dataToFind: *mut Object,
options: NSDataSearchOptions,
searchRange: NSRange,
) -> NSRange
unsafe fn rangeOfData_options_range_( self, dataToFind: *mut Object, options: NSDataSearchOptions, searchRange: NSRange, ) -> NSRange
๐Deprecated: use the objc2-foundation crate instead
Sourceยงunsafe fn base64EncodedDataWithOptions_(
self,
options: NSDataBase64EncodingOptions,
) -> *mut Object
unsafe fn base64EncodedDataWithOptions_( self, options: NSDataBase64EncodingOptions, ) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
Sourceยงunsafe fn base64EncodedStringWithOptions_(
self,
options: NSDataBase64EncodingOptions,
) -> *mut Object
unsafe fn base64EncodedStringWithOptions_( self, options: NSDataBase64EncodingOptions, ) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
Sourceยงunsafe fn isEqualToData_(self, otherData: *mut Object) -> *mut Object
unsafe fn isEqualToData_(self, otherData: *mut Object) -> *mut Object
๐Deprecated: use the objc2-foundation crate instead
Sourceยงunsafe fn writeToFile_atomically_(self, path: *mut Object, atomically: i8) -> i8
unsafe fn writeToFile_atomically_(self, path: *mut Object, atomically: i8) -> i8
๐Deprecated: use the objc2-foundation crate instead
Sourceยงunsafe fn writeToFile_options_error_(
self,
path: *mut Object,
mask: NSDataWritingOptions,
errorPtr: *mut *mut Object,
) -> i8
unsafe fn writeToFile_options_error_( self, path: *mut Object, mask: NSDataWritingOptions, errorPtr: *mut *mut Object, ) -> i8
๐Deprecated: use the objc2-foundation crate instead
Sourceยงunsafe fn writeToURL_atomically_(self, aURL: *mut Object, atomically: i8) -> i8
unsafe fn writeToURL_atomically_(self, aURL: *mut Object, atomically: i8) -> i8
๐Deprecated: use the objc2-foundation crate instead
Sourceยงunsafe fn writeToURL_options_error_(
self,
aURL: *mut Object,
mask: NSDataWritingOptions,
errorPtr: *mut *mut Object,
) -> i8
unsafe fn writeToURL_options_error_( self, aURL: *mut Object, mask: NSDataWritingOptions, errorPtr: *mut *mut Object, ) -> i8
๐Deprecated: use the objc2-foundation crate instead