Trait INSCoder

Source
pub trait INSCoder: PNSObject {
Show 32 methods // Provided methods fn p_allows_keyed_coding(&self) -> bool { ... } fn m_contains_value_for_key(&self, key: NSString) -> bool { ... } fn p_decoding_failure_policy(&self) -> NSDecodingFailurePolicy { ... } fn m_encode_array_of_objc_type_count_at( &mut self, type_: *const c_char, count: usize, array: *const c_void, ) { ... } fn m_encode_bool_for_key(&mut self, value: bool, key: NSString) { ... } fn m_encode_bycopy_object<T>(&mut self, object: T) where T: PNSObject + ToId { ... } fn m_encode_byref_object<T>(&mut self, object: T) where T: PNSObject { ... } fn m_encode_bytes_length(&mut self, bytes: *const c_void, length: UInt) { ... } fn m_encode_bytes_length_for_key( &mut self, bytes: *const UInt8, length: UInt, key: NSString, ) { ... } fn m_encode_conditional_object<T>(&mut self, object: T) where T: PNSObject { ... } fn m_encode_conditional_object_for_key<T>( &mut self, object: T, key: NSString, ) where T: PNSObject { ... } fn m_encode_data_object<T>(&mut self, object: T) where T: PNSObject { ... } fn m_encode_double_for_key(&mut self, value: c_double, key: NSString) { ... } fn m_encode_float_for_key(&mut self, value: c_float, key: NSString) { ... } fn m_encode_int_for_key(&mut self, value: Int, key: NSString) { ... } fn m_encode_integer_for_key(&mut self, value: Int, key: NSString) { ... } fn m_encode_int32_for_key(&mut self, value: Int32, key: NSString) { ... } fn m_encode_int64_for_key(&mut self, value: Int64, key: NSString) { ... } fn m_encode_object<T>(&mut self, object: T) where T: PNSObject { ... } fn m_encode_object_for_key<T>(&mut self, object: T, key: NSString) where T: PNSObject { ... } fn m_encode_point(&mut self, point: NSPoint) { ... } fn m_encode_point_for_key(&mut self, point: NSPoint, key: NSString) { ... } fn m_encode_property_list(&mut self, property_list: id) { ... } fn m_encode_rect(&mut self, rect: NSRect) { ... } fn m_encode_rect_for_key(&mut self, rect: NSRect, key: NSString) { ... } fn m_encode_root_object(&mut self, root_object: id) { ... } fn m_encode_size(&mut self, size: NSSize) { ... } fn m_encode_size_for_key(&mut self, size: NSSize, key: NSString) { ... } fn m_encode_value_of_objc_type_at( &mut self, _type: *const c_char, addr: *const c_void, ) { ... } fn m_encode_cgpoint_for_key(&mut self, point: CGPoint, key: NSString) { ... } fn m_encode_cgrect_for_key(&mut self, rect: CGRect, key: NSString) { ... } fn m_encode_cgzize_for_key(&mut self, size: CGSize, key: NSString) { ... }
}
Expand description

A trait containing all the methods for NSCoder

Provided Methods§

Source

fn p_allows_keyed_coding(&self) -> bool

Returns a Boolean value that indicates whether an encoded value is available for a string.

Source

fn m_contains_value_for_key(&self, key: NSString) -> bool

Returns a Boolean value that indicates whether an encoded value is available for a string.

Source

fn p_decoding_failure_policy(&self) -> NSDecodingFailurePolicy

The action the coder should take when decoding fails.

Source

fn m_encode_array_of_objc_type_count_at( &mut self, type_: *const c_char, count: usize, array: *const c_void, )

Encodes an array of the given Objective-C type, provided the number of items and a pointer.

Source

fn m_encode_bool_for_key(&mut self, value: bool, key: NSString)

Encodes a Boolean value and associates it with the string key.

Source

fn m_encode_bycopy_object<T>(&mut self, object: T)
where T: PNSObject + ToId,

An encoding method for subclasses to override such that it creates a copy, rather than a proxy, when decoded.

Source

fn m_encode_byref_object<T>(&mut self, object: T)
where T: PNSObject,

An encoding method for subclasses to override such that it creates a proxy, rather than a copy, when decoded.

Source

fn m_encode_bytes_length(&mut self, bytes: *const c_void, length: UInt)

Encodes a buffer of data of an unspecified type.

Source

fn m_encode_bytes_length_for_key( &mut self, bytes: *const UInt8, length: UInt, key: NSString, )

Encodes a buffer of data, given its length and a pointer, and associates it with a string key.

Source

fn m_encode_conditional_object<T>(&mut self, object: T)
where T: PNSObject,

An encoding method for subclasses to override to conditionally encode an object, preserving common references to it.

Source

fn m_encode_conditional_object_for_key<T>(&mut self, object: T, key: NSString)
where T: PNSObject,

An encoding method for subclasses to override to conditionally encode an object, preserving common references to it, only if it has been unconditionally encoded.

Source

fn m_encode_data_object<T>(&mut self, object: T)
where T: PNSObject,

Encodes a given data object.

Source

fn m_encode_double_for_key(&mut self, value: c_double, key: NSString)

Encodes a double-precision floating point value and associates it with the string key.

Source

fn m_encode_float_for_key(&mut self, value: c_float, key: NSString)

Encodes a floating point value and associates it with the string key.

Source

fn m_encode_int_for_key(&mut self, value: Int, key: NSString)

Encodes a C integer value and associates it with the string key.

Source

fn m_encode_integer_for_key(&mut self, value: Int, key: NSString)

Encodes an integer value and associates it with the string key.

Source

fn m_encode_int32_for_key(&mut self, value: Int32, key: NSString)

Encodes a 32-bit integer value and associates it with the string key.

Source

fn m_encode_int64_for_key(&mut self, value: Int64, key: NSString)

Encodes a 64-bit integer value and associates it with the string key.

Source

fn m_encode_object<T>(&mut self, object: T)
where T: PNSObject,

Encodes an object.

Source

fn m_encode_object_for_key<T>(&mut self, object: T, key: NSString)
where T: PNSObject,

Encodes an object and associates it with the string key.

Source

fn m_encode_point(&mut self, point: NSPoint)

Encodes a point.

Source

fn m_encode_point_for_key(&mut self, point: NSPoint, key: NSString)

Encodes a point and associates it with the string key.

Source

fn m_encode_property_list(&mut self, property_list: id)

Encodes a property list.

Source

fn m_encode_rect(&mut self, rect: NSRect)

Encodes a rectangle structure.

Source

fn m_encode_rect_for_key(&mut self, rect: NSRect, key: NSString)

Encodes a rectangle structure and associates it with the string key.

Source

fn m_encode_root_object(&mut self, root_object: id)

An encoding method for subclasses to override to encode an interconnected group of objects, starting with the provided root object.

Source

fn m_encode_size(&mut self, size: NSSize)

Encodes a size structure.

Source

fn m_encode_size_for_key(&mut self, size: NSSize, key: NSString)

Encodes a size structure and associates it with the given string key.

Source

fn m_encode_value_of_objc_type_at( &mut self, _type: *const c_char, addr: *const c_void, )

Encodes a value of the given type at the given address.

Source

fn m_encode_cgpoint_for_key(&mut self, point: CGPoint, key: NSString)

Encodes a point and associates it with the specified key in the receiver’s archive.

Source

fn m_encode_cgrect_for_key(&mut self, rect: CGRect, key: NSString)

Encodes a rectangle and associates it with the specified key in the receiver’s archive.

Source

fn m_encode_cgzize_for_key(&mut self, size: CGSize, key: NSString)

Encodes size information and associates it with the specified key in the coder’s archive.

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.

Implementors§