Skip to main content

NSCollectionViewDataSource

Trait NSCollectionViewDataSource 

Source
pub unsafe trait NSCollectionViewDataSource: NSObjectProtocol + MainThreadOnly {
    // Provided methods
    fn collectionView_numberOfItemsInSection(
        &self,
        collection_view: &NSCollectionView,
        section: NSInteger,
    ) -> NSInteger
       where Self: Sized + Message { ... }
    fn collectionView_itemForRepresentedObjectAtIndexPath(
        &self,
        collection_view: &NSCollectionView,
        index_path: &NSIndexPath,
    ) -> Retained<NSCollectionViewItem>
       where Self: Sized + Message { ... }
    fn numberOfSectionsInCollectionView(
        &self,
        collection_view: &NSCollectionView,
    ) -> NSInteger
       where Self: Sized + Message { ... }
    fn collectionView_viewForSupplementaryElementOfKind_atIndexPath(
        &self,
        collection_view: &NSCollectionView,
        kind: &NSCollectionViewSupplementaryElementKind,
        index_path: &NSIndexPath,
    ) -> Retained<NSView>
       where Self: Sized + Message { ... }
}
Available on crate feature NSCollectionView only.
Expand description

Provided Methods§

Source

fn collectionView_numberOfItemsInSection( &self, collection_view: &NSCollectionView, section: NSInteger, ) -> NSInteger
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
Source

fn collectionView_itemForRepresentedObjectAtIndexPath( &self, collection_view: &NSCollectionView, index_path: &NSIndexPath, ) -> Retained<NSCollectionViewItem>
where Self: Sized + Message,

Available on crate features NSResponder and NSView and NSViewController only.
Source

fn numberOfSectionsInCollectionView( &self, collection_view: &NSCollectionView, ) -> NSInteger
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
Source

fn collectionView_viewForSupplementaryElementOfKind_atIndexPath( &self, collection_view: &NSCollectionView, kind: &NSCollectionViewSupplementaryElementKind, index_path: &NSIndexPath, ) -> Retained<NSView>
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.

Trait Implementations§

Source§

impl<T> ImplementedBy<T> for dyn NSCollectionViewDataSource

Source§

impl ProtocolType for dyn NSCollectionViewDataSource

Source§

const NAME: &'static str = "NSCollectionViewDataSource"

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> NSCollectionViewDataSource for ProtocolObject<T>

Implementors§