Struct NSFileProviderErrorCode

Source
#[repr(transparent)]
pub struct NSFileProviderErrorCode(pub NSInteger);
Available on crate feature NSFileProviderError only.
Expand description

Tuple Fields§

§0: NSInteger

Implementations§

Source§

impl NSFileProviderErrorCode

Source

pub const NotAuthenticated: Self

The user credentials cannot be verified

Source

pub const FilenameCollision: Self

An item already exists with the same parentItemIdentifier and filename (or with a filename differing only in case.)

Note: Please use -[NSError (NSFileProviderError) fileProviderErrorForCollisionWithItem:] to build an error with this code.

See: -[NSError (NSFileProviderError) fileProviderErrorForCollisionWithItem:]

Source

pub const SyncAnchorExpired: Self

The value of the sync anchor is too old, and the system must re-sync from scratch

Source

pub const PageExpired: Self

The value of the page token is too old, and the system must re-sync from scratch

Source

pub const InsufficientQuota: Self

The item has not been uploaded because it would push the account over quota

Source

pub const ServerUnreachable: Self

Connecting to the servers failed

Source

pub const NoSuchItem: Self

The requested item doesn’t exist

Note: Please use -[NSError (NSFileProviderError) fileProviderErrorForNonExistentItemWithIdentifier:] to build an error with this code.

See: -[NSError (NSFileProviderError) fileProviderErrorForNonExistentItemWithIdentifier:]

Source

pub const DeletionRejected: Self

The provider disallowed the deletion of the item.

Note: Please use -[NSError (NSFileProviderError) fileProviderErrorForRejectedDeletionOfItem:] to build an error with this code.

See: -[NSError (NSFileProviderError) fileProviderErrorForRejectedDeletionOfItem:]

Source

pub const DirectoryNotEmpty: Self

We’re trying to non-recursively delete a non-empty directory

Source

pub const ProviderNotFound: Self

Returned by NSFileProviderManager if no provider could be found in the application

Source

pub const ProviderTranslocated: Self

Returned by NSFileProviderManager if the application’s provider has been disabled due to app translocation

Source

pub const OlderExtensionVersionRunning: Self

Returned by NSFileProviderManager if the provider registered in the system is an older version than the one corresponding to this app. The NSFilePathErrorKey key points to the location of the older version. If the location of the older version cannot be determined (e.g. because it was since deleted), the NSFilePathErrorKey will not be set.

Source

pub const NewerExtensionVersionFound: Self

Returned by NSFileProviderManager if the provider registered in the system is a newer version than the one corresponding to this app.

Source

pub const CannotSynchronize: Self

Indicates that synchronization cannot happen.

This error can be returned by the provider or the system.

This is returned by NSFileProviderManager if a barrier failed for a sync-related error.

If the failure is caused by a specific item, the system will set the NSFileProviderErrorItemKey to the corresponding item identifier and the NSUnderlyingErrorKey will be set to the error encountered by that item.

When a provider returns this error on createItem or updateItem, it means that syncing that item is definitively broken. The system will not retry syncing those items, until either: The operating system has been updated. The FileProvider extension has been updated. The item is modified on disk.

Source

pub const NonEvictableChildren: Self

Returned by NSFileProviderManager if directory eviction failed because the target contains non-evictable items.

-[NSError underlyingErrors] is set to an array of the underlying errors. Each one has NSURLErrorKey set to identify the particular file or directory affected by this error. The number of reported failing items is capped to an implementation-defined number.

  • domain: NSFileProviderErrorDomain errorCode: NSFileProviderErrorUnsyncedEdits error: if the item had unsynced content.
  • domain: NSFileProviderErrorDomain errorCode: NSFileProviderErrorNonEvictable error: if the item has been marked as non-purgeable by the provider.
  • domain: NSPOSIXErrorDomain errorCode: EBUSY - if the item had open file descriptors on it.
  • domain: NSPOSIXErrorDomain errorCode: EMLINK : if the item had several hardlinks.
Source

pub const UnsyncedEdits: Self

Returned by NSFileProviderManager if item eviction is failing because the item has edits that have not been synced yet

The NSURLErrorKey will be set to with the item URL that has unsynced content.

Source

pub const NonEvictable: Self

Returned by NSFileProviderManager if item eviction is failing because the item has not been assigned the evictable capability.

The NSURLErrorKey will be set to with the corresponding item URL.

Source

pub const VersionNoLongerAvailable: Self

Returned by the provider to indicate that the requested version for an item cannot be provided.

When a provider returns that error, it means the version for this item is definitively unavailable. It is intended to be returned by fetchPartialContentsForItemWithIdentifier, when NSFileProviderFetchContentsOptionsStrictVersioning is set, to tell the system that a remote update happened to the item that outdated the requested version.

Source

pub const ExcludedFromSync: Self

Returned by createItemBasedOnTemplate or modifyItem if the provider does not wish to sync the item.

When a provider returns this error, it causes the item to be excluded from sync. The system will ensure that the item (and any descendents, in case of a directory), are downloaded, and then issue a deleteItem call to the provider for the item.

The system will call createItemBasedOnTemplate for the item, whenever the item’s metadata changes on disk. This ensures that the provider’s rules for excluding from sync are re-evaluated whenever the item’s properties change.

§Re-evaluating items

If the provider wishes for previously excluded items to be re-sent as createItemBasedOnTemplate calls, the provider may call -[NSFileProviderManager signalErrorResolved:completionHandler:] with this error code.

If the provider wishes to exclude items which had previously been synced, the provider may call -[NSFileProviderManager requestModificationOfFields:forItemWithIdentifier:options:completionHandler:]. This will cause the system to send a new modifyItem call to the provider. At that time, the provider can choose to return this error code.

Source

pub const DomainDisabled: Self

Returned by createItemBasedOnTemplate or modifyItem if the provider does not wish to sync the item.

When a provider returns this error, it causes the item to be excluded from sync. The system will ensure that the item (and any descendents, in case of a directory), are downloaded, and then issue a deleteItem call to the provider for the item.

The system will call createItemBasedOnTemplate for the item, whenever the item’s metadata changes on disk. This ensures that the provider’s rules for excluding from sync are re-evaluated whenever the item’s properties change.

§Re-evaluating items

If the provider wishes for previously excluded items to be re-sent as createItemBasedOnTemplate calls, the provider may call -[NSFileProviderManager signalErrorResolved:completionHandler:] with this error code.

If the provider wishes to exclude items which had previously been synced, the provider may call -[NSFileProviderManager requestModificationOfFields:forItemWithIdentifier:options:completionHandler:]. This will cause the system to send a new modifyItem call to the provider. At that time, the provider can choose to return this error code.

Source

pub const ProviderDomainTemporarilyUnavailable: Self

Returned by createItemBasedOnTemplate or modifyItem if the provider does not wish to sync the item.

When a provider returns this error, it causes the item to be excluded from sync. The system will ensure that the item (and any descendents, in case of a directory), are downloaded, and then issue a deleteItem call to the provider for the item.

The system will call createItemBasedOnTemplate for the item, whenever the item’s metadata changes on disk. This ensures that the provider’s rules for excluding from sync are re-evaluated whenever the item’s properties change.

§Re-evaluating items

If the provider wishes for previously excluded items to be re-sent as createItemBasedOnTemplate calls, the provider may call -[NSFileProviderManager signalErrorResolved:completionHandler:] with this error code.

If the provider wishes to exclude items which had previously been synced, the provider may call -[NSFileProviderManager requestModificationOfFields:forItemWithIdentifier:options:completionHandler:]. This will cause the system to send a new modifyItem call to the provider. At that time, the provider can choose to return this error code.

Source

pub const ProviderDomainNotFound: Self

Returned by createItemBasedOnTemplate or modifyItem if the provider does not wish to sync the item.

When a provider returns this error, it causes the item to be excluded from sync. The system will ensure that the item (and any descendents, in case of a directory), are downloaded, and then issue a deleteItem call to the provider for the item.

The system will call createItemBasedOnTemplate for the item, whenever the item’s metadata changes on disk. This ensures that the provider’s rules for excluding from sync are re-evaluated whenever the item’s properties change.

§Re-evaluating items

If the provider wishes for previously excluded items to be re-sent as createItemBasedOnTemplate calls, the provider may call -[NSFileProviderManager signalErrorResolved:completionHandler:] with this error code.

If the provider wishes to exclude items which had previously been synced, the provider may call -[NSFileProviderManager requestModificationOfFields:forItemWithIdentifier:options:completionHandler:]. This will cause the system to send a new modifyItem call to the provider. At that time, the provider can choose to return this error code.

Source

pub const ApplicationExtensionNotFound: Self

Returned by createItemBasedOnTemplate or modifyItem if the provider does not wish to sync the item.

When a provider returns this error, it causes the item to be excluded from sync. The system will ensure that the item (and any descendents, in case of a directory), are downloaded, and then issue a deleteItem call to the provider for the item.

The system will call createItemBasedOnTemplate for the item, whenever the item’s metadata changes on disk. This ensures that the provider’s rules for excluding from sync are re-evaluated whenever the item’s properties change.

§Re-evaluating items

If the provider wishes for previously excluded items to be re-sent as createItemBasedOnTemplate calls, the provider may call -[NSFileProviderManager signalErrorResolved:completionHandler:] with this error code.

If the provider wishes to exclude items which had previously been synced, the provider may call -[NSFileProviderManager requestModificationOfFields:forItemWithIdentifier:options:completionHandler:]. This will cause the system to send a new modifyItem call to the provider. At that time, the provider can choose to return this error code.

Trait Implementations§

Source§

impl Clone for NSFileProviderErrorCode

Source§

fn clone(&self) -> NSFileProviderErrorCode

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NSFileProviderErrorCode

Source§

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

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

impl Encode for NSFileProviderErrorCode

Source§

const ENCODING: Encoding = NSInteger::ENCODING

The Objective-C type-encoding for this type.
Source§

impl Hash for NSFileProviderErrorCode

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 Ord for NSFileProviderErrorCode

Source§

fn cmp(&self, other: &NSFileProviderErrorCode) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for NSFileProviderErrorCode

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for NSFileProviderErrorCode

Source§

fn partial_cmp(&self, other: &NSFileProviderErrorCode) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl RefEncode for NSFileProviderErrorCode

Source§

const ENCODING_REF: Encoding

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

impl Copy for NSFileProviderErrorCode

Source§

impl Eq for NSFileProviderErrorCode

Source§

impl StructuralPartialEq for NSFileProviderErrorCode

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> EncodeArgument for T
where T: Encode,

Source§

const ENCODING_ARGUMENT: Encoding = T::ENCODING

The Objective-C type-encoding for this type.
Source§

impl<T> EncodeReturn for T
where T: Encode,

Source§

const ENCODING_RETURN: Encoding = T::ENCODING

The Objective-C type-encoding for this type.
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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>,

Source§

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,