cidre 0.9.1

Apple frameworks bindings for rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::{arc, define_obj_type, ml, ns, objc};

#[objc::protocol(MLBatchProvider)]
pub trait BatchProvider: objc::Obj {
    #[objc::msg_send(count)]
    fn count(&self) -> isize;

    #[objc::msg_send(featuresAtIndex:)]
    fn features_at_index(&self, index: isize) -> arc::R<ml::AnyFeatureProvider>;
}

define_obj_type!(
    pub AnyBatchProvider(ns::Id)
);

impl BatchProvider for AnyBatchProvider {}