Skip to main content

Crate mtl_foundation

Crate mtl_foundation 

Source
Expand description

Foundation framework bindings for Rust.

This crate provides Rust bindings to Apple’s Foundation framework, corresponding to the C++ headers in metal-cpp/Foundation/.

§Overview

The Foundation framework provides fundamental classes for Objective-C programming, including:

§C++ Correspondence

This crate provides 1:1 correspondence with the metal-cpp Foundation headers:

C++ HeaderRust Module
NSTypes.hpptypes
NSObjCRuntime.hppobjc_runtime
NSRange.hpprange
NSObject.hppobject
NSSharedPtr.hppshared_ptr
NSString.hppstring
NSArray.hpp[array]
NSDictionary.hppdictionary
NSSet.hppset
NSData.hppdata
NSNumber.hppnumber
NSDate.hppdate
NSError.hpperror
NSURL.hppurl
NSEnumerator.hppenumerator
NSAutoreleasePool.hppautorelease
NSNotification.hppnotification
NSLock.hpplock
NSBundle.hppbundle
NSProcessInfo.hppprocess_info

Re-exports§

pub use types::INTEGER_MAX;
pub use types::INTEGER_MIN;
pub use types::UINTEGER_MAX;
pub use types::Integer;
pub use types::OperatingSystemVersion;
pub use types::TimeInterval;
pub use types::UInteger;
pub use objc_runtime::ComparisonResult;
pub use objc_runtime::NOT_FOUND;
pub use range::Range;
pub use object::Copying;
pub use object::Object;
pub use object::Referencing;
pub use object::SecureCoding;
pub use shared_ptr::SharedPtr;
pub use shared_ptr::retain_ptr;
pub use shared_ptr::transfer_ptr;
pub use string::String;
pub use string::StringCompareOptions;
pub use string::StringEncoding;
pub use string::Unichar;
pub use array::Array;
pub use dictionary::Dictionary;
pub use set::Set;
pub use data::Data;
pub use number::Number;
pub use number::Value;
pub use date::Date;
pub use error::Error;
pub use error::ErrorDomain;
pub use error::ErrorUserInfoKey;
pub use error::cocoa_error_domain;
pub use error::debug_description_error_key;
pub use error::file_path_error_key;
pub use error::help_anchor_error_key;
pub use error::localized_description_key;
pub use error::localized_failure_error_key;
pub use error::localized_failure_reason_error_key;
pub use error::localized_recovery_options_error_key;
pub use error::localized_recovery_suggestion_error_key;
pub use error::mach_error_domain;
pub use error::os_status_error_domain;
pub use error::posix_error_domain;
pub use error::recovery_attempter_error_key;
pub use error::string_encoding_error_key;
pub use error::underlying_error_key;
pub use error::url_error_key;
pub use enumerator::Enumerator;
pub use enumerator::FastEnumeration;
pub use enumerator::FastEnumerationState;
pub use url::Url;
pub use autorelease::AutoreleasePool;
pub use autorelease::AutoreleasePoolScope;
pub use notification::Notification;
pub use notification::NotificationCenter;
pub use notification::NotificationName;
pub use lock::Condition;
pub use lock::Locking;
pub use bundle::Bundle;
pub use bundle::localized_string;
pub use bundle::localized_string_from_table;
pub use bundle::localized_string_from_table_in_bundle;
pub use bundle::localized_string_with_default_value;
pub use process_info::ActivityOptions;
pub use process_info::DeviceCertification;
pub use process_info::ProcessInfo;
pub use process_info::ProcessInfoThermalState;
pub use process_info::ProcessPerformanceProfile;

Modules§

array
Array type for Foundation.
autorelease
Autorelease pool for Foundation.
bundle
Bundle type for Foundation.
data
Data type for Foundation.
date
Date type for Foundation.
dictionary
Dictionary type for Foundation.
enumerator
Enumerator types for Foundation.
error
Error type for Foundation.
lock
Locking types for Foundation.
notification
Notification types for Foundation.
number
Value and Number types for Foundation.
objc_runtime
Objective-C runtime types.
object
Base object traits for Foundation.
process_info
Process information for Foundation.
range
Range type for Foundation.
set
Set type for Foundation.
shared_ptr
Smart pointer for Objective-C objects.
string
String type for Foundation.
types
Foundation type definitions.
url
URL type for Foundation.