pub trait NSString: Sized {
// Required methods
unsafe fn stringByAppendingString_(self, other: id) -> id;
unsafe fn init_str(self, string: &str) -> Self;
unsafe fn UTF8String(self) -> *const c_char;
unsafe fn len(self) -> usize;
unsafe fn isEqualToString(self, string: &str) -> bool;
unsafe fn substringWithRange(self, range: NSRange) -> id;
// Provided method
unsafe fn alloc(_: Self) -> id { ... }
}
๐Deprecated: use the objc2-foundation crate instead
Required Methodsยง
unsafe fn stringByAppendingString_(self, other: id) -> id
๐Deprecated: use the objc2-foundation crate instead
unsafe fn init_str(self, string: &str) -> Self
๐Deprecated: use the objc2-foundation crate instead
unsafe fn UTF8String(self) -> *const c_char
๐Deprecated: use the objc2-foundation crate instead
unsafe fn len(self) -> usize
๐Deprecated: use the objc2-foundation crate instead
unsafe fn isEqualToString(self, string: &str) -> bool
๐Deprecated: use the objc2-foundation crate instead
unsafe fn substringWithRange(self, range: NSRange) -> id
๐Deprecated: use the objc2-foundation crate instead
Provided Methodsยง
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.