Struct objc2_ui_kit::UIManagedDocument

source ·
#[repr(C)]
pub struct UIManagedDocument { /* private fields */ }
Available on crate features UIDocument and UIManagedDocument only.

Implementations§

source§

impl UIManagedDocument

source

pub unsafe fn persistentStoreName(mtm: MainThreadMarker) -> Retained<NSString>

source

pub unsafe fn managedObjectContext(&self) -> Retained<NSManagedObjectContext>

Available on crate feature objc2-core-data only.
source

pub unsafe fn managedObjectModel(&self) -> Retained<NSManagedObjectModel>

Available on crate feature objc2-core-data only.
source

pub unsafe fn persistentStoreOptions(&self) -> Option<Retained<NSDictionary>>

source

pub unsafe fn setPersistentStoreOptions( &self, persistent_store_options: Option<&NSDictionary> )

source

pub unsafe fn modelConfiguration(&self) -> Option<Retained<NSString>>

source

pub unsafe fn setModelConfiguration( &self, model_configuration: Option<&NSString> )

source

pub unsafe fn configurePersistentStoreCoordinatorForURL_ofType_modelConfiguration_storeOptions_error( &self, store_url: &NSURL, file_type: &NSString, configuration: Option<&NSString>, store_options: Option<&NSDictionary> ) -> Result<(), Retained<NSError>>

source

pub unsafe fn persistentStoreTypeForFileType( &self, file_type: &NSString ) -> Retained<NSString>

source

pub unsafe fn readAdditionalContentFromURL_error( &self, absolute_url: &NSURL ) -> Result<(), Retained<NSError>>

source

pub unsafe fn additionalContentForURL_error( &self, absolute_url: &NSURL ) -> Result<Retained<AnyObject>, Retained<NSError>>

source

pub unsafe fn writeAdditionalContent_toURL_originalContentsURL_error( &self, content: &AnyObject, absolute_url: &NSURL, absolute_original_contents_url: Option<&NSURL> ) -> Result<(), Retained<NSError>>

source§

impl UIManagedDocument

Methods declared on superclass UIDocument

source

pub unsafe fn initWithFileURL( this: Allocated<Self>, url: &NSURL ) -> Retained<Self>

source§

impl UIManagedDocument

Methods declared on superclass NSObject

source

pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>

source

pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>

Methods from Deref<Target = UIDocument>§

source

pub unsafe fn fileURL(&self) -> Retained<NSURL>

source

pub unsafe fn localizedName(&self) -> Retained<NSString>

source

pub unsafe fn fileType(&self) -> Option<Retained<NSString>>

source

pub unsafe fn fileModificationDate(&self) -> Option<Retained<NSDate>>

source

pub unsafe fn setFileModificationDate( &self, file_modification_date: Option<&NSDate> )

source

pub unsafe fn documentState(&self) -> UIDocumentState

source

pub unsafe fn progress(&self) -> Option<Retained<NSProgress>>

source

pub unsafe fn openWithCompletionHandler( &self, completion_handler: Option<&Block<dyn Fn(Bool)>> )

Available on crate feature block2 only.
source

pub unsafe fn closeWithCompletionHandler( &self, completion_handler: Option<&Block<dyn Fn(Bool)>> )

Available on crate feature block2 only.
source

pub unsafe fn loadFromContents_ofType_error( &self, contents: &AnyObject, type_name: Option<&NSString> ) -> Result<(), Retained<NSError>>

source

pub unsafe fn contentsForType_error( &self, type_name: &NSString ) -> Result<Retained<AnyObject>, Retained<NSError>>

source

pub unsafe fn disableEditing(&self)

source

pub unsafe fn enableEditing(&self)

source

pub unsafe fn undoManager(&self) -> Option<Retained<NSUndoManager>>

source

pub unsafe fn setUndoManager(&self, undo_manager: Option<&NSUndoManager>)

source

pub unsafe fn hasUnsavedChanges(&self) -> bool

source

pub unsafe fn updateChangeCount(&self, change: UIDocumentChangeKind)

source

pub unsafe fn changeCountTokenForSaveOperation( &self, save_operation: UIDocumentSaveOperation ) -> Retained<AnyObject>

source

pub unsafe fn updateChangeCountWithToken_forSaveOperation( &self, change_count_token: &AnyObject, save_operation: UIDocumentSaveOperation )

source

pub unsafe fn saveToURL_forSaveOperation_completionHandler( &self, url: &NSURL, save_operation: UIDocumentSaveOperation, completion_handler: Option<&Block<dyn Fn(Bool)>> )

Available on crate feature block2 only.
source

pub unsafe fn autosaveWithCompletionHandler( &self, completion_handler: Option<&Block<dyn Fn(Bool)>> )

Available on crate feature block2 only.
source

pub unsafe fn savingFileType(&self) -> Option<Retained<NSString>>

source

pub unsafe fn fileNameExtensionForType_saveOperation( &self, type_name: Option<&NSString>, save_operation: UIDocumentSaveOperation ) -> Retained<NSString>

source

pub unsafe fn writeContents_andAttributes_safelyToURL_forSaveOperation_error( &self, contents: &AnyObject, additional_file_attributes: Option<&NSDictionary>, url: &NSURL, save_operation: UIDocumentSaveOperation ) -> Result<(), Retained<NSError>>

source

pub unsafe fn writeContents_toURL_forSaveOperation_originalContentsURL_error( &self, contents: &AnyObject, url: &NSURL, save_operation: UIDocumentSaveOperation, original_contents_url: Option<&NSURL> ) -> Result<(), Retained<NSError>>

source

pub unsafe fn fileAttributesToWriteToURL_forSaveOperation_error( &self, url: &NSURL, save_operation: UIDocumentSaveOperation ) -> Result<Retained<NSDictionary>, Retained<NSError>>

source

pub unsafe fn readFromURL_error( &self, url: &NSURL ) -> Result<(), Retained<NSError>>

source

pub unsafe fn performAsynchronousFileAccessUsingBlock( &self, block: &Block<dyn Fn()> )

Available on crate feature block2 only.
source

pub unsafe fn handleError_userInteractionPermitted( &self, error: &NSError, user_interaction_permitted: bool )

source

pub unsafe fn finishedHandlingError_recovered( &self, error: &NSError, recovered: bool )

source

pub unsafe fn userInteractionNoLongerPermittedForError(&self, error: &NSError)

source

pub unsafe fn revertToContentsOfURL_completionHandler( &self, url: &NSURL, completion_handler: Option<&Block<dyn Fn(Bool)>> )

Available on crate feature block2 only.
source

pub unsafe fn userActivity(&self) -> Option<Retained<NSUserActivity>>

source

pub unsafe fn setUserActivity(&self, user_activity: Option<&NSUserActivity>)

source

pub unsafe fn updateUserActivityState(&self, user_activity: &NSUserActivity)

source

pub unsafe fn restoreUserActivityState(&self, user_activity: &NSUserActivity)

Methods from Deref<Target = NSObject>§

source

pub fn doesNotRecognizeSelector(&self, sel: Sel) -> !

Handle messages the object doesn’t recognize.

See Apple’s documentation for details.

Methods from Deref<Target = AnyObject>§

source

pub fn class(&self) -> &'static AnyClass

Available on crate feature UIIndirectScribbleInteraction only.

Dynamically find the class of this object.

§Example

Check that an instance of NSObject has the precise class NSObject.

use objc2::ClassType;
use objc2::runtime::NSObject;

let obj = NSObject::new();
assert_eq!(obj.class(), NSObject::class());
source

pub unsafe fn get_ivar<T>(&self, name: &str) -> &T
where T: Encode,

👎Deprecated: this is difficult to use correctly, use Ivar::load instead.
Available on crate feature UIIndirectScribbleInteraction only.

Use Ivar::load instead.

§Safety

The object must have an instance variable with the given name, and it must be of type T.

See Ivar::load_ptr for details surrounding this.

source

pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut T
where T: Encode,

👎Deprecated: this is difficult to use correctly, use Ivar::load_mut instead.
Available on crate feature UIIndirectScribbleInteraction only.

Use Ivar::load_mut instead.

§Safety

The object must have an instance variable with the given name, and it must be of type T.

See Ivar::load_ptr for details surrounding this.

Trait Implementations§

source§

impl AsMut<AnyObject> for UIManagedDocument

source§

fn as_mut(&mut self) -> &mut AnyObject

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl AsMut<NSObject> for UIManagedDocument

source§

fn as_mut(&mut self) -> &mut NSObject

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl AsMut<UIDocument> for UIManagedDocument

source§

fn as_mut(&mut self) -> &mut UIDocument

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl AsMut<UIManagedDocument> for UIManagedDocument

source§

fn as_mut(&mut self) -> &mut Self

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl AsRef<AnyObject> for UIManagedDocument

source§

fn as_ref(&self) -> &AnyObject

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<NSObject> for UIManagedDocument

source§

fn as_ref(&self) -> &NSObject

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<UIDocument> for UIManagedDocument

source§

fn as_ref(&self) -> &UIDocument

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<UIManagedDocument> for UIManagedDocument

source§

fn as_ref(&self) -> &Self

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Borrow<AnyObject> for UIManagedDocument

source§

fn borrow(&self) -> &AnyObject

Immutably borrows from an owned value. Read more
source§

impl Borrow<NSObject> for UIManagedDocument

source§

fn borrow(&self) -> &NSObject

Immutably borrows from an owned value. Read more
source§

impl Borrow<UIDocument> for UIManagedDocument

source§

fn borrow(&self) -> &UIDocument

Immutably borrows from an owned value. Read more
source§

impl BorrowMut<AnyObject> for UIManagedDocument

source§

fn borrow_mut(&mut self) -> &mut AnyObject

Mutably borrows from an owned value. Read more
source§

impl BorrowMut<NSObject> for UIManagedDocument

source§

fn borrow_mut(&mut self) -> &mut NSObject

Mutably borrows from an owned value. Read more
source§

impl BorrowMut<UIDocument> for UIManagedDocument

source§

fn borrow_mut(&mut self) -> &mut UIDocument

Mutably borrows from an owned value. Read more
source§

impl ClassType for UIManagedDocument

§

type Super = UIDocument

The superclass of this class. Read more
§

type Mutability = MainThreadOnly

Whether the type is mutable or immutable. Read more
source§

const NAME: &'static str = "UIManagedDocument"

The name of the Objective-C class that this type represents. Read more
source§

fn class() -> &'static AnyClass

Get a reference to the Objective-C class that this type represents. Read more
source§

fn as_super(&self) -> &Self::Super

Get an immutable reference to the superclass.
source§

fn as_super_mut(&mut self) -> &mut Self::Super

Get a mutable reference to the superclass.
source§

fn retain(&self) -> Retained<Self>
where Self: IsRetainable + Sized,

Increment the reference count of the receiver. Read more
source§

impl Debug for UIManagedDocument

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Deref for UIManagedDocument

§

type Target = UIDocument

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl DerefMut for UIManagedDocument

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl Hash for UIManagedDocument

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl NSFilePresenter for UIManagedDocument

source§

unsafe fn presentedItemURL(&self) -> Option<Retained<NSURL>>
where Self: Sized + Message,

Available on crate feature NSURL only.
source§

unsafe fn presentedItemOperationQueue(&self) -> Retained<NSOperationQueue>
where Self: Sized + Message,

Available on crate feature NSOperation only.
source§

unsafe fn primaryPresentedItemURL(&self) -> Option<Retained<NSURL>>
where Self: Sized + Message,

Available on crate feature NSURL only.
source§

unsafe fn relinquishPresentedItemToReader( &self, reader: &Block<dyn Fn(*mut Block<dyn Fn()>)> )
where Self: Sized + Message,

Available on crate feature block2 only.
source§

unsafe fn relinquishPresentedItemToWriter( &self, writer: &Block<dyn Fn(*mut Block<dyn Fn()>)> )
where Self: Sized + Message,

Available on crate feature block2 only.
source§

unsafe fn savePresentedItemChangesWithCompletionHandler( &self, completion_handler: &Block<dyn Fn(*mut NSError)> )
where Self: Sized + Message,

Available on crate features NSError and block2 only.
source§

unsafe fn accommodatePresentedItemDeletionWithCompletionHandler( &self, completion_handler: &Block<dyn Fn(*mut NSError)> )
where Self: Sized + Message,

Available on crate features NSError and block2 only.
source§

unsafe fn accommodatePresentedItemEvictionWithCompletionHandler( &self, completion_handler: &Block<dyn Fn(*mut NSError)> )
where Self: Sized + Message,

Available on crate features NSError and block2 only.
source§

unsafe fn presentedItemDidMoveToURL(&self, new_url: &NSURL)
where Self: Sized + Message,

Available on crate feature NSURL only.
source§

unsafe fn presentedItemDidChange(&self)
where Self: Sized + Message,

source§

unsafe fn presentedItemDidChangeUbiquityAttributes( &self, attributes: &NSSet<NSString> )
where Self: Sized + Message,

Available on crate features NSSet and NSString and NSURL only.
source§

unsafe fn observedPresentedItemUbiquityAttributes( &self ) -> Retained<NSSet<NSString>>
where Self: Sized + Message,

Available on crate features NSSet and NSString and NSURL only.
source§

unsafe fn accommodatePresentedSubitemDeletionAtURL_completionHandler( &self, url: &NSURL, completion_handler: &Block<dyn Fn(*mut NSError)> )
where Self: Sized + Message,

Available on crate features NSError and NSURL and block2 only.
source§

unsafe fn presentedSubitemDidAppearAtURL(&self, url: &NSURL)
where Self: Sized + Message,

Available on crate feature NSURL only.
source§

unsafe fn presentedSubitemAtURL_didMoveToURL( &self, old_url: &NSURL, new_url: &NSURL )
where Self: Sized + Message,

Available on crate feature NSURL only.
source§

unsafe fn presentedSubitemDidChangeAtURL(&self, url: &NSURL)
where Self: Sized + Message,

Available on crate feature NSURL only.
source§

impl NSObjectProtocol for UIManagedDocument

source§

fn isEqual(&self, other: &AnyObject) -> bool
where Self: Sized + Message,

Check whether the object is equal to an arbitrary other object. Read more
source§

fn hash(&self) -> usize
where Self: Sized + Message,

An integer that can be used as a table address in a hash table structure. Read more
source§

fn isKindOfClass(&self, cls: &AnyClass) -> bool
where Self: Sized + Message,

Check if the object is an instance of the class, or one of its subclasses. Read more
source§

fn is_kind_of<T>(&self) -> bool
where T: ClassType, Self: Sized + Message,

Check if the object is an instance of the class type, or one of its subclasses. Read more
source§

fn isMemberOfClass(&self, cls: &AnyClass) -> bool
where Self: Sized + Message,

Check if the object is an instance of a specific class, without checking subclasses. Read more
source§

fn respondsToSelector(&self, aSelector: Sel) -> bool
where Self: Sized + Message,

Check whether the object implements or inherits a method with the given selector. Read more
source§

fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
where Self: Sized + Message,

Check whether the object conforms to a given protocol. Read more
source§

fn description(&self) -> Retained<NSObject>
where Self: Sized + Message,

A textual representation of the object. Read more
source§

fn debugDescription(&self) -> Retained<NSObject>
where Self: Sized + Message,

A textual representation of the object to use when debugging. Read more
source§

fn isProxy(&self) -> bool
where Self: Sized + Message,

Check whether the receiver is a subclass of the NSProxy root class instead of the usual NSObject. Read more
source§

fn retainCount(&self) -> usize
where Self: Sized + Message,

The reference count of the object. Read more
source§

impl NSProgressReporting for UIManagedDocument

source§

unsafe fn progress(&self) -> Retained<NSProgress>
where Self: Sized + Message,

source§

impl PartialEq for UIManagedDocument

source§

fn eq(&self, other: &UIManagedDocument) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl RefEncode for UIManagedDocument

source§

const ENCODING_REF: Encoding = <UIDocument as ::objc2::RefEncode>::ENCODING_REF

The Objective-C type-encoding for a reference of this type. Read more
source§

impl Eq for UIManagedDocument

source§

impl Message for UIManagedDocument

source§

impl StructuralPartialEq for UIManagedDocument

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CounterpartOrSelf for T
where T: ClassType + ?Sized, <T as ClassType>::Mutability: MutabilityCounterpartOrSelf<T>,

§

type Immutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Immutable

The immutable counterpart of the type, or Self if the type has no immutable counterpart. Read more
§

type Mutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Mutable

The mutable counterpart of the type, or Self if the type has no mutable counterpart. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> AutoreleaseSafe for T
where T: ?Sized,

source§

impl<T> IsIdCloneable for T
where T: ClassType + ?Sized, <T as ClassType>::Mutability: MutabilityIsIdCloneable,

source§

impl<T> IsMainThreadOnly for T
where T: ClassType + ?Sized, <T as ClassType>::Mutability: MutabilityIsMainThreadOnly,

source§

impl<T> IsRetainable for T
where T: ClassType + ?Sized, <T as ClassType>::Mutability: MutabilityIsRetainable,