Trait FSVolumeRenameOperations

Source
pub unsafe trait FSVolumeRenameOperations: NSObjectProtocol {
    // Provided methods
    unsafe fn isVolumeRenameInhibited(&self) -> bool
       where Self: Sized + Message { ... }
    unsafe fn setVolumeRenameInhibited(&self, volume_rename_inhibited: bool)
       where Self: Sized + Message { ... }
    unsafe fn setVolumeName_replyHandler(
        &self,
        name: &FSFileName,
        reply: &DynBlock<dyn Fn(NonNull<FSFileName>, *mut NSError)>,
    )
       where Self: Sized + Message { ... }
}
Available on crate feature FSVolume only.
Expand description

Methods and properties implemented by volumes that support renaming the volume.

See also Apple’s documentation

Provided Methods§

Source

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

A Boolean value that instructs FSKit not to call this protocol’s methods, even if the volume conforms to it.

FSKit reads this value after the file system replies to the loadResource message. Changing the returned value during the runtime of the volume has no effect.

Source

unsafe fn setVolumeRenameInhibited(&self, volume_rename_inhibited: bool)
where Self: Sized + Message,

Source

unsafe fn setVolumeName_replyHandler( &self, name: &FSFileName, reply: &DynBlock<dyn Fn(NonNull<FSFileName>, *mut NSError)>, )
where Self: Sized + Message,

Available on crate features FSFileName and block2 only.

Sets a new name for the volume.

  • Parameters:
  • name: The new volume name.
  • reply: A block or closure to indicate success or failure. If renaming succeeds, pass an FSFileName of the new volume name and a nil error. If renaming fails, pass the relevant error as the second parameter; FSKit ignores any FSFileName in this case. For an async Swift implementation, there’s no reply handler; simply return the FSFileName or throw an error.

Trait Implementations§

Source§

impl ProtocolType for dyn FSVolumeRenameOperations

Source§

const NAME: &'static str = "FSVolumeRenameOperations"

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 FSVolumeRenameOperations

Implementations on Foreign Types§

Source§

impl<T> FSVolumeRenameOperations for ProtocolObject<T>

Implementors§