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
impl UIManagedDocument
pub unsafe fn persistentStoreName(mtm: MainThreadMarker) -> Retained<NSString>
pub unsafe fn managedObjectContext(&self) -> Retained<NSManagedObjectContext>
Available on crate feature
objc2-core-data
only.pub unsafe fn managedObjectModel(&self) -> Retained<NSManagedObjectModel>
Available on crate feature
objc2-core-data
only.pub unsafe fn persistentStoreOptions(&self) -> Option<Retained<NSDictionary>>
pub unsafe fn setPersistentStoreOptions( &self, persistent_store_options: Option<&NSDictionary> )
pub unsafe fn modelConfiguration(&self) -> Option<Retained<NSString>>
pub unsafe fn setModelConfiguration( &self, model_configuration: Option<&NSString> )
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>>
pub unsafe fn persistentStoreTypeForFileType( &self, file_type: &NSString ) -> Retained<NSString>
pub unsafe fn readAdditionalContentFromURL_error( &self, absolute_url: &NSURL ) -> Result<(), Retained<NSError>>
pub unsafe fn additionalContentForURL_error( &self, absolute_url: &NSURL ) -> Result<Retained<AnyObject>, Retained<NSError>>
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
impl UIManagedDocument
Methods declared on superclass UIDocument
pub unsafe fn initWithFileURL( this: Allocated<Self>, url: &NSURL ) -> Retained<Self>
Methods from Deref<Target = UIDocument>§
pub unsafe fn fileURL(&self) -> Retained<NSURL>
pub unsafe fn localizedName(&self) -> Retained<NSString>
pub unsafe fn fileType(&self) -> Option<Retained<NSString>>
pub unsafe fn fileModificationDate(&self) -> Option<Retained<NSDate>>
pub unsafe fn setFileModificationDate( &self, file_modification_date: Option<&NSDate> )
pub unsafe fn documentState(&self) -> UIDocumentState
pub unsafe fn progress(&self) -> Option<Retained<NSProgress>>
pub unsafe fn openWithCompletionHandler( &self, completion_handler: Option<&Block<dyn Fn(Bool)>> )
Available on crate feature
block2
only.pub unsafe fn closeWithCompletionHandler( &self, completion_handler: Option<&Block<dyn Fn(Bool)>> )
Available on crate feature
block2
only.pub unsafe fn loadFromContents_ofType_error( &self, contents: &AnyObject, type_name: Option<&NSString> ) -> Result<(), Retained<NSError>>
pub unsafe fn contentsForType_error( &self, type_name: &NSString ) -> Result<Retained<AnyObject>, Retained<NSError>>
pub unsafe fn disableEditing(&self)
pub unsafe fn enableEditing(&self)
pub unsafe fn undoManager(&self) -> Option<Retained<NSUndoManager>>
pub unsafe fn setUndoManager(&self, undo_manager: Option<&NSUndoManager>)
pub unsafe fn hasUnsavedChanges(&self) -> bool
pub unsafe fn updateChangeCount(&self, change: UIDocumentChangeKind)
pub unsafe fn changeCountTokenForSaveOperation( &self, save_operation: UIDocumentSaveOperation ) -> Retained<AnyObject>
pub unsafe fn updateChangeCountWithToken_forSaveOperation( &self, change_count_token: &AnyObject, save_operation: UIDocumentSaveOperation )
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.pub unsafe fn autosaveWithCompletionHandler( &self, completion_handler: Option<&Block<dyn Fn(Bool)>> )
Available on crate feature
block2
only.pub unsafe fn savingFileType(&self) -> Option<Retained<NSString>>
pub unsafe fn fileNameExtensionForType_saveOperation( &self, type_name: Option<&NSString>, save_operation: UIDocumentSaveOperation ) -> Retained<NSString>
pub unsafe fn writeContents_andAttributes_safelyToURL_forSaveOperation_error( &self, contents: &AnyObject, additional_file_attributes: Option<&NSDictionary>, url: &NSURL, save_operation: UIDocumentSaveOperation ) -> Result<(), Retained<NSError>>
pub unsafe fn writeContents_toURL_forSaveOperation_originalContentsURL_error( &self, contents: &AnyObject, url: &NSURL, save_operation: UIDocumentSaveOperation, original_contents_url: Option<&NSURL> ) -> Result<(), Retained<NSError>>
pub unsafe fn fileAttributesToWriteToURL_forSaveOperation_error( &self, url: &NSURL, save_operation: UIDocumentSaveOperation ) -> Result<Retained<NSDictionary>, Retained<NSError>>
pub unsafe fn readFromURL_error( &self, url: &NSURL ) -> Result<(), Retained<NSError>>
pub unsafe fn performAsynchronousFileAccessUsingBlock( &self, block: &Block<dyn Fn()> )
Available on crate feature
block2
only.pub unsafe fn handleError_userInteractionPermitted( &self, error: &NSError, user_interaction_permitted: bool )
pub unsafe fn finishedHandlingError_recovered( &self, error: &NSError, recovered: bool )
pub unsafe fn userInteractionNoLongerPermittedForError(&self, error: &NSError)
pub unsafe fn revertToContentsOfURL_completionHandler( &self, url: &NSURL, completion_handler: Option<&Block<dyn Fn(Bool)>> )
Available on crate feature
block2
only.pub unsafe fn userActivity(&self) -> Option<Retained<NSUserActivity>>
pub unsafe fn setUserActivity(&self, user_activity: Option<&NSUserActivity>)
pub unsafe fn updateUserActivityState(&self, user_activity: &NSUserActivity)
pub unsafe fn restoreUserActivityState(&self, user_activity: &NSUserActivity)
Methods from Deref<Target = NSObject>§
sourcepub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
pub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
Handle messages the object doesn’t recognize.
See Apple’s documentation for details.
Methods from Deref<Target = AnyObject>§
sourcepub fn class(&self) -> &'static AnyClass
Available on crate feature UIIndirectScribbleInteraction
only.
pub fn class(&self) -> &'static AnyClass
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());
sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load
instead.Available on crate feature UIIndirectScribbleInteraction
only.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Ivar::load
instead.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.
sourcepub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load_mut
instead.Available on crate feature UIIndirectScribbleInteraction
only.
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Ivar::load_mut
instead.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
impl AsMut<AnyObject> for UIManagedDocument
source§impl AsMut<NSObject> for UIManagedDocument
impl AsMut<NSObject> for UIManagedDocument
source§impl AsMut<UIDocument> for UIManagedDocument
impl AsMut<UIDocument> for UIManagedDocument
source§fn as_mut(&mut self) -> &mut UIDocument
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
impl AsMut<UIManagedDocument> for UIManagedDocument
source§impl AsRef<AnyObject> for UIManagedDocument
impl AsRef<AnyObject> for UIManagedDocument
source§impl AsRef<NSObject> for UIManagedDocument
impl AsRef<NSObject> for UIManagedDocument
source§impl AsRef<UIDocument> for UIManagedDocument
impl AsRef<UIDocument> for UIManagedDocument
source§fn as_ref(&self) -> &UIDocument
fn as_ref(&self) -> &UIDocument
Converts this type into a shared reference of the (usually inferred) input type.
source§impl AsRef<UIManagedDocument> for UIManagedDocument
impl AsRef<UIManagedDocument> for UIManagedDocument
source§impl Borrow<AnyObject> for UIManagedDocument
impl Borrow<AnyObject> for UIManagedDocument
source§impl Borrow<NSObject> for UIManagedDocument
impl Borrow<NSObject> for UIManagedDocument
source§impl Borrow<UIDocument> for UIManagedDocument
impl Borrow<UIDocument> for UIManagedDocument
source§fn borrow(&self) -> &UIDocument
fn borrow(&self) -> &UIDocument
Immutably borrows from an owned value. Read more
source§impl BorrowMut<AnyObject> for UIManagedDocument
impl BorrowMut<AnyObject> for UIManagedDocument
source§fn borrow_mut(&mut self) -> &mut AnyObject
fn borrow_mut(&mut self) -> &mut AnyObject
Mutably borrows from an owned value. Read more
source§impl BorrowMut<NSObject> for UIManagedDocument
impl BorrowMut<NSObject> for UIManagedDocument
source§fn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
Mutably borrows from an owned value. Read more
source§impl BorrowMut<UIDocument> for UIManagedDocument
impl BorrowMut<UIDocument> for UIManagedDocument
source§fn borrow_mut(&mut self) -> &mut UIDocument
fn borrow_mut(&mut self) -> &mut UIDocument
Mutably borrows from an owned value. Read more
source§impl ClassType for UIManagedDocument
impl ClassType for UIManagedDocument
§type Super = UIDocument
type Super = UIDocument
The superclass of this class. Read more
§type Mutability = MainThreadOnly
type Mutability = MainThreadOnly
Whether the type is mutable or immutable. Read more
source§const NAME: &'static str = "UIManagedDocument"
const NAME: &'static str = "UIManagedDocument"
The name of the Objective-C class that this type represents. Read more
source§fn class() -> &'static AnyClass
fn class() -> &'static AnyClass
Get a reference to the Objective-C class that this type represents. Read more
source§fn as_super_mut(&mut self) -> &mut Self::Super
fn as_super_mut(&mut self) -> &mut Self::Super
Get a mutable reference to the superclass.
source§impl Debug for UIManagedDocument
impl Debug for UIManagedDocument
source§impl Deref for UIManagedDocument
impl Deref for UIManagedDocument
source§impl DerefMut for UIManagedDocument
impl DerefMut for UIManagedDocument
source§impl Hash for UIManagedDocument
impl Hash for UIManagedDocument
source§impl NSFilePresenter for UIManagedDocument
impl NSFilePresenter for UIManagedDocument
source§unsafe fn presentedItemURL(&self) -> Option<Retained<NSURL>>
unsafe fn presentedItemURL(&self) -> Option<Retained<NSURL>>
Available on crate feature
NSURL
only.source§unsafe fn presentedItemOperationQueue(&self) -> Retained<NSOperationQueue>
unsafe fn presentedItemOperationQueue(&self) -> Retained<NSOperationQueue>
Available on crate feature
NSOperation
only.source§unsafe fn primaryPresentedItemURL(&self) -> Option<Retained<NSURL>>
unsafe fn primaryPresentedItemURL(&self) -> Option<Retained<NSURL>>
Available on crate feature
NSURL
only.source§unsafe fn relinquishPresentedItemToReader(
&self,
reader: &Block<dyn Fn(*mut Block<dyn Fn()>)>
)
unsafe fn relinquishPresentedItemToReader( &self, reader: &Block<dyn Fn(*mut Block<dyn Fn()>)> )
Available on crate feature
block2
only.source§unsafe fn relinquishPresentedItemToWriter(
&self,
writer: &Block<dyn Fn(*mut Block<dyn Fn()>)>
)
unsafe fn relinquishPresentedItemToWriter( &self, writer: &Block<dyn Fn(*mut Block<dyn Fn()>)> )
Available on crate feature
block2
only.source§unsafe fn savePresentedItemChangesWithCompletionHandler(
&self,
completion_handler: &Block<dyn Fn(*mut NSError)>
)
unsafe fn savePresentedItemChangesWithCompletionHandler( &self, completion_handler: &Block<dyn Fn(*mut NSError)> )
Available on crate features
NSError
and block2
only.source§unsafe fn accommodatePresentedItemDeletionWithCompletionHandler(
&self,
completion_handler: &Block<dyn Fn(*mut NSError)>
)
unsafe fn accommodatePresentedItemDeletionWithCompletionHandler( &self, completion_handler: &Block<dyn Fn(*mut NSError)> )
Available on crate features
NSError
and block2
only.source§unsafe fn accommodatePresentedItemEvictionWithCompletionHandler(
&self,
completion_handler: &Block<dyn Fn(*mut NSError)>
)
unsafe fn accommodatePresentedItemEvictionWithCompletionHandler( &self, completion_handler: &Block<dyn Fn(*mut NSError)> )
Available on crate features
NSError
and block2
only.source§unsafe fn presentedItemDidMoveToURL(&self, new_url: &NSURL)
unsafe fn presentedItemDidMoveToURL(&self, new_url: &NSURL)
Available on crate feature
NSURL
only.unsafe fn presentedItemDidChange(&self)
source§unsafe fn presentedItemDidChangeUbiquityAttributes(
&self,
attributes: &NSSet<NSString>
)
unsafe fn presentedItemDidChangeUbiquityAttributes( &self, attributes: &NSSet<NSString> )
Available on crate features
NSSet
and NSString
and NSURL
only.source§unsafe fn observedPresentedItemUbiquityAttributes(
&self
) -> Retained<NSSet<NSString>>
unsafe fn observedPresentedItemUbiquityAttributes( &self ) -> Retained<NSSet<NSString>>
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)>
)
unsafe fn accommodatePresentedSubitemDeletionAtURL_completionHandler( &self, url: &NSURL, completion_handler: &Block<dyn Fn(*mut NSError)> )
Available on crate features
NSError
and NSURL
and block2
only.source§unsafe fn presentedSubitemDidAppearAtURL(&self, url: &NSURL)
unsafe fn presentedSubitemDidAppearAtURL(&self, url: &NSURL)
Available on crate feature
NSURL
only.source§unsafe fn presentedSubitemAtURL_didMoveToURL(
&self,
old_url: &NSURL,
new_url: &NSURL
)
unsafe fn presentedSubitemAtURL_didMoveToURL( &self, old_url: &NSURL, new_url: &NSURL )
Available on crate feature
NSURL
only.source§impl NSObjectProtocol for UIManagedDocument
impl NSObjectProtocol for UIManagedDocument
source§fn isEqual(&self, other: &AnyObject) -> bool
fn isEqual(&self, other: &AnyObject) -> bool
Check whether the object is equal to an arbitrary other object. Read more
source§fn hash(&self) -> usize
fn hash(&self) -> usize
An integer that can be used as a table address in a hash table
structure. Read more
source§fn isKindOfClass(&self, cls: &AnyClass) -> bool
fn isKindOfClass(&self, cls: &AnyClass) -> bool
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
fn is_kind_of<T>(&self) -> bool
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
fn isMemberOfClass(&self, cls: &AnyClass) -> bool
Check if the object is an instance of a specific class, without
checking subclasses. Read more
source§fn respondsToSelector(&self, aSelector: Sel) -> bool
fn respondsToSelector(&self, aSelector: Sel) -> bool
Check whether the object implements or inherits a method with the
given selector. Read more
source§fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
Check whether the object conforms to a given protocol. Read more
source§fn debugDescription(&self) -> Retained<NSObject>
fn debugDescription(&self) -> Retained<NSObject>
A textual representation of the object to use when debugging. Read more
source§impl PartialEq for UIManagedDocument
impl PartialEq for UIManagedDocument
source§fn eq(&self, other: &UIManagedDocument) -> bool
fn eq(&self, other: &UIManagedDocument) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl RefEncode for UIManagedDocument
impl RefEncode for UIManagedDocument
source§const ENCODING_REF: Encoding = <UIDocument as ::objc2::RefEncode>::ENCODING_REF
const ENCODING_REF: Encoding = <UIDocument as ::objc2::RefEncode>::ENCODING_REF
The Objective-C type-encoding for a reference of this type. Read more
impl Eq for UIManagedDocument
impl Message for UIManagedDocument
impl StructuralPartialEq for UIManagedDocument
Auto Trait Implementations§
impl !Freeze for UIManagedDocument
impl !RefUnwindSafe for UIManagedDocument
impl !Send for UIManagedDocument
impl !Sync for UIManagedDocument
impl !Unpin for UIManagedDocument
impl !UnwindSafe for UIManagedDocument
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CounterpartOrSelf for T
impl<T> CounterpartOrSelf for T
§type Immutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Immutable
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
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