Struct objc2_foundation::NSProgress
source · #[repr(C)]pub struct NSProgress { /* private fields */ }
Available on crate feature
NSProgress
only.Implementations§
source§impl NSProgress
impl NSProgress
pub unsafe fn currentProgress() -> Option<Retained<NSProgress>>
pub unsafe fn progressWithTotalUnitCount( unit_count: i64 ) -> Retained<NSProgress>
pub unsafe fn discreteProgressWithTotalUnitCount( unit_count: i64 ) -> Retained<NSProgress>
pub unsafe fn progressWithTotalUnitCount_parent_pendingUnitCount( unit_count: i64, parent: &NSProgress, portion_of_parent_total_unit_count: i64 ) -> Retained<NSProgress>
pub unsafe fn initWithParent_userInfo( this: Allocated<Self>, parent_progress_or_nil: Option<&NSProgress>, user_info_or_nil: Option<&NSDictionary<NSProgressUserInfoKey, AnyObject>> ) -> Retained<Self>
Available on crate features
NSDictionary
and NSString
only.pub unsafe fn becomeCurrentWithPendingUnitCount(&self, unit_count: i64)
pub unsafe fn performAsCurrentWithPendingUnitCount_usingBlock( &self, unit_count: i64, work: &Block<dyn Fn() + '_> )
Available on crate feature
block2
only.pub unsafe fn resignCurrent(&self)
pub unsafe fn addChild_withPendingUnitCount( &self, child: &NSProgress, in_unit_count: i64 )
pub unsafe fn totalUnitCount(&self) -> i64
pub unsafe fn setTotalUnitCount(&self, total_unit_count: i64)
pub unsafe fn completedUnitCount(&self) -> i64
pub unsafe fn setCompletedUnitCount(&self, completed_unit_count: i64)
pub unsafe fn localizedDescription(&self) -> Retained<NSString>
Available on crate feature
NSString
only.pub unsafe fn setLocalizedDescription( &self, localized_description: Option<&NSString> )
Available on crate feature
NSString
only.pub unsafe fn localizedAdditionalDescription(&self) -> Retained<NSString>
Available on crate feature
NSString
only.pub unsafe fn setLocalizedAdditionalDescription( &self, localized_additional_description: Option<&NSString> )
Available on crate feature
NSString
only.pub unsafe fn isCancellable(&self) -> bool
pub unsafe fn setCancellable(&self, cancellable: bool)
pub unsafe fn isPausable(&self) -> bool
pub unsafe fn setPausable(&self, pausable: bool)
pub unsafe fn isCancelled(&self) -> bool
pub unsafe fn isPaused(&self) -> bool
pub unsafe fn cancellationHandler(&self) -> *mut Block<dyn Fn()>
Available on crate feature
block2
only.pub unsafe fn setCancellationHandler( &self, cancellation_handler: Option<&Block<dyn Fn()>> )
Available on crate feature
block2
only.pub unsafe fn pausingHandler(&self) -> *mut Block<dyn Fn()>
Available on crate feature
block2
only.pub unsafe fn setPausingHandler( &self, pausing_handler: Option<&Block<dyn Fn()>> )
Available on crate feature
block2
only.pub unsafe fn resumingHandler(&self) -> *mut Block<dyn Fn()>
Available on crate feature
block2
only.pub unsafe fn setResumingHandler( &self, resuming_handler: Option<&Block<dyn Fn()>> )
Available on crate feature
block2
only.pub unsafe fn setUserInfoObject_forKey( &self, object_or_nil: Option<&AnyObject>, key: &NSProgressUserInfoKey )
Available on crate feature
NSString
only.pub unsafe fn isIndeterminate(&self) -> bool
pub unsafe fn fractionCompleted(&self) -> c_double
pub unsafe fn isFinished(&self) -> bool
pub unsafe fn cancel(&self)
pub unsafe fn pause(&self)
pub unsafe fn resume(&self)
pub unsafe fn userInfo( &self ) -> Retained<NSDictionary<NSProgressUserInfoKey, AnyObject>>
Available on crate features
NSDictionary
and NSString
only.pub unsafe fn kind(&self) -> Option<Retained<NSProgressKind>>
Available on crate feature
NSString
only.pub unsafe fn setKind(&self, kind: Option<&NSProgressKind>)
Available on crate feature
NSString
only.pub unsafe fn estimatedTimeRemaining(&self) -> Option<Retained<NSNumber>>
Available on crate feature
NSValue
only.pub unsafe fn setEstimatedTimeRemaining( &self, estimated_time_remaining: Option<&NSNumber> )
Available on crate feature
NSValue
only.pub unsafe fn throughput(&self) -> Option<Retained<NSNumber>>
Available on crate feature
NSValue
only.pub unsafe fn setThroughput(&self, throughput: Option<&NSNumber>)
Available on crate feature
NSValue
only.pub unsafe fn fileOperationKind( &self ) -> Option<Retained<NSProgressFileOperationKind>>
Available on crate feature
NSString
only.pub unsafe fn setFileOperationKind( &self, file_operation_kind: Option<&NSProgressFileOperationKind> )
Available on crate feature
NSString
only.pub unsafe fn fileURL(&self) -> Option<Retained<NSURL>>
Available on crate feature
NSURL
only.pub unsafe fn setFileURL(&self, file_url: Option<&NSURL>)
Available on crate feature
NSURL
only.pub unsafe fn fileTotalCount(&self) -> Option<Retained<NSNumber>>
Available on crate feature
NSValue
only.pub unsafe fn setFileTotalCount(&self, file_total_count: Option<&NSNumber>)
Available on crate feature
NSValue
only.pub unsafe fn fileCompletedCount(&self) -> Option<Retained<NSNumber>>
Available on crate feature
NSValue
only.pub unsafe fn setFileCompletedCount( &self, file_completed_count: Option<&NSNumber> )
Available on crate feature
NSValue
only.pub unsafe fn publish(&self)
pub unsafe fn unpublish(&self)
pub unsafe fn addSubscriberForFileURL_withPublishingHandler( url: &NSURL, publishing_handler: NSProgressPublishingHandler ) -> Retained<AnyObject>
Available on crate features
NSURL
and block2
only.pub unsafe fn removeSubscriber(subscriber: &AnyObject)
pub unsafe fn isOld(&self) -> bool
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
pub fn class(&self) -> &'static AnyClass
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.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Ivar::load
instead.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.
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Ivar::load_mut
instead.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 NSProgress
impl AsMut<AnyObject> for NSProgress
source§impl AsMut<NSObject> for NSProgress
impl AsMut<NSObject> for NSProgress
source§impl AsMut<NSProgress> for NSProgress
impl AsMut<NSProgress> for NSProgress
source§impl AsRef<AnyObject> for NSProgress
impl AsRef<AnyObject> for NSProgress
source§impl AsRef<NSObject> for NSProgress
impl AsRef<NSObject> for NSProgress
source§impl AsRef<NSProgress> for NSProgress
impl AsRef<NSProgress> for NSProgress
source§impl Borrow<AnyObject> for NSProgress
impl Borrow<AnyObject> for NSProgress
source§impl Borrow<NSObject> for NSProgress
impl Borrow<NSObject> for NSProgress
source§impl BorrowMut<AnyObject> for NSProgress
impl BorrowMut<AnyObject> for NSProgress
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 NSProgress
impl BorrowMut<NSObject> for NSProgress
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 ClassType for NSProgress
impl ClassType for NSProgress
§type Mutability = InteriorMutable
type Mutability = InteriorMutable
Whether the type is mutable or immutable. Read more
source§const NAME: &'static str = "NSProgress"
const NAME: &'static str = "NSProgress"
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 NSProgress
impl Debug for NSProgress
source§impl Deref for NSProgress
impl Deref for NSProgress
source§impl DerefMut for NSProgress
impl DerefMut for NSProgress
source§impl Hash for NSProgress
impl Hash for NSProgress
source§impl NSObjectProtocol for NSProgress
impl NSObjectProtocol for NSProgress
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 NSProgress
impl PartialEq for NSProgress
source§fn eq(&self, other: &NSProgress) -> bool
fn eq(&self, other: &NSProgress) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl RefEncode for NSProgress
impl RefEncode for NSProgress
source§const ENCODING_REF: Encoding = <NSObject as ::objc2::RefEncode>::ENCODING_REF
const ENCODING_REF: Encoding = <NSObject as ::objc2::RefEncode>::ENCODING_REF
The Objective-C type-encoding for a reference of this type. Read more
impl Eq for NSProgress
impl Message for NSProgress
impl Send for NSProgress
impl StructuralPartialEq for NSProgress
impl Sync for NSProgress
Auto Trait Implementations§
impl !Freeze for NSProgress
impl !RefUnwindSafe for NSProgress
impl !Unpin for NSProgress
impl !UnwindSafe for NSProgress
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