FSManageableResourceMaintenanceOperations

Trait FSManageableResourceMaintenanceOperations 

Source
pub unsafe trait FSManageableResourceMaintenanceOperations: NSObjectProtocol {
    // Provided methods
    unsafe fn startCheckWithTask_options_error(
        &self,
        task: &FSTask,
        options: &FSTaskOptions,
    ) -> Result<Retained<NSProgress>, Retained<NSError>>
       where Self: Sized + Message { ... }
    unsafe fn startFormatWithTask_options_error(
        &self,
        task: &FSTask,
        options: &FSTaskOptions,
    ) -> Result<Retained<NSProgress>, Retained<NSError>>
       where Self: Sized + Message { ... }
}
Available on crate feature FSResource only.
Expand description

Maintenance operations for a file system’s resources.

This protocol includes operations to check and format a resource for an FSUnaryFileSystem. Conform to this protocol if you implement a FSUnaryFileSystem that uses an FSBlockDeviceResource-c.class.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn startCheckWithTask_options_error( &self, task: &FSTask, options: &FSTaskOptions, ) -> Result<Retained<NSProgress>, Retained<NSError>>
where Self: Sized + Message,

Available on crate features FSTask and FSTaskOptions only.

Starts checking the file system with the given options.

  • Parameters:
  • task: A task object you use to communicate back to the client.
  • options: Options for performing the check.
  • error: In Objective-C, a pointer to an <doc ://com.apple.documentation/documentation/Foundation/NSError>. Populate this with any error that occurs when starting the check. In Swift, throw an <doc ://com.apple.documentation/documentation/Swift/Error> instead.
  • Returns: An <doc ://com.apple.documentation/documentation/Foundation/NSProgress> object that you use to update progress as the check operation progresses. Return nil if starting the file system check encountered an error.
Source

unsafe fn startFormatWithTask_options_error( &self, task: &FSTask, options: &FSTaskOptions, ) -> Result<Retained<NSProgress>, Retained<NSError>>
where Self: Sized + Message,

Available on crate features FSTask and FSTaskOptions only.

Starts formatting the file system with the given options.

  • Parameters:
  • task: A task object you use to communicate back to the client.
  • options: Options for performing the format.
  • error: In Objective-C, a pointer to an <doc ://com.apple.documentation/documentation/Foundation/NSError>. Populate this with any error that occurs when starting the format. In Swift, throw an <doc ://com.apple.documentation/documentation/Swift/Error> instead.
  • Returns: An <doc ://com.apple.documentation/documentation/Foundation/NSProgress> object that you use to update progress as the format operation progresses. Return nil if starting to format the file system encountered an error.

Trait Implementations§

Source§

impl ProtocolType for dyn FSManageableResourceMaintenanceOperations

Source§

const NAME: &'static str = "FSManageableResourceMaintenanceOperations"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn FSManageableResourceMaintenanceOperations

Implementations on Foreign Types§

Source§

impl<T> FSManageableResourceMaintenanceOperations for ProtocolObject<T>

Implementors§