pub struct Value(/* private fields */);Expand description
An Objective-C value object.
C++ equivalent: NS::Value
Implementations§
Source§impl Value
impl Value
Sourcepub fn value(value: *const c_void, obj_c_type: *const c_char) -> Option<Self>
pub fn value(value: *const c_void, obj_c_type: *const c_char) -> Option<Self>
Create a value from bytes and type encoding.
C++ equivalent: static Value* value(const void* pValue, const char* pType)
Sourcepub fn value_with_pointer(pointer: *const c_void) -> Option<Self>
pub fn value_with_pointer(pointer: *const c_void) -> Option<Self>
Create a value from a pointer.
C++ equivalent: static Value* value(const void* pPointer)
Sourcepub fn init_with_bytes(
&self,
value: *const c_void,
obj_c_type: *const c_char,
) -> Option<Self>
pub fn init_with_bytes( &self, value: *const c_void, obj_c_type: *const c_char, ) -> Option<Self>
Initialize with bytes and type encoding.
C++ equivalent: Value* init(const void* pValue, const char* pType)
Sourcepub fn init_with_coder(&self, coder: *const c_void) -> Option<Self>
pub fn init_with_coder(&self, coder: *const c_void) -> Option<Self>
Initialize with a coder.
C++ equivalent: Value* init(const class Coder* pCoder)
Sourcepub fn get_value(&self, value: *mut c_void, size: UInteger)
pub fn get_value(&self, value: *mut c_void, size: UInteger)
Get the value bytes.
C++ equivalent: void getValue(void* pValue, UInteger size) const
Sourcepub fn objc_type(&self) -> *const c_char
pub fn objc_type(&self) -> *const c_char
Get the Objective-C type encoding.
C++ equivalent: const char* objCType() const
Sourcepub fn is_equal_to_value(&self, value: &Value) -> bool
pub fn is_equal_to_value(&self, value: &Value) -> bool
Check if equal to another value.
C++ equivalent: bool isEqualToValue(Value* pValue) const
Sourcepub fn pointer_value(&self) -> *mut c_void
pub fn pointer_value(&self) -> *mut c_void
Get the pointer value.
C++ equivalent: void* pointerValue() const