Skip to main content

betfair_types/
lib.rs

1//! # Betfair Types library
2
3pub mod bot_login;
4pub mod customer_order_ref;
5pub mod customer_ref;
6pub mod customer_strategy_ref;
7pub mod handicap;
8pub mod numeric;
9pub mod price;
10pub mod size;
11
12#[cfg(test)]
13pub mod tests;
14
15// Re-export numeric types for convenience
16pub use numeric::F64Ord;
17
18pub mod keep_alive {
19    pub use crate::shared::*;
20}
21
22pub mod logout {
23    pub use crate::shared::*;
24}
25mod shared;
26
27/// The generated types
28#[expect(clippy::all)]
29pub mod types {
30    include!(concat!(env!("OUT_DIR"), "/mod.rs"));
31}
32
33impl types::sports_aping::MarketId {
34    /// Construct a new market id
35    pub fn new(id: impl Into<String>) -> Self {
36        Self(std::sync::Arc::new(id.into()))
37    }
38}
39
40impl types::sports_aping::BetId {
41    /// construct a new bet id
42    pub fn new(id: impl Into<String>) -> Self {
43        Self(std::sync::Arc::new(id.into()))
44    }
45}