pub struct Pitwall;Expand description
Unified entry point for Pitwall telemetry connections.
This factory provides a consistent API for creating connections to both live iRacing telemetry and IBT file replay.
§Examples
§Live Telemetry (Windows)
use pitwall::Pitwall;
#[tokio::main]
async fn main() -> pitwall::Result<()> {
let connection = Pitwall::connect().await?;
// Use connection...
Ok(())
}§IBT File Replay (Cross-platform)
use pitwall::Pitwall;
#[tokio::main]
async fn main() -> pitwall::Result<()> {
let connection = Pitwall::open("session.ibt").await?;
// Use connection...
Ok(())
}Implementations§
Source§impl Pitwall
impl Pitwall
Sourcepub async fn connect() -> Result<LiveConnection>
pub async fn connect() -> Result<LiveConnection>
Connect to live iRacing telemetry.
Establishes a connection to iRacing’s shared memory on Windows. This method waits for iRacing to be running and telemetry to be available.
§Platform
This method is only available on Windows where iRacing runs.
On other platforms, this method returns an UnsupportedPlatform error.
§Errors
Returns an error if:
- Platform is not Windows
- iRacing is not running
- Shared memory is not accessible
- Connection timeout is reached
§Example
use pitwall::Pitwall;
let connection = Pitwall::connect().await?;Sourcepub async fn open<P: AsRef<Path>>(path: P) -> Result<ReplayConnection>
pub async fn open<P: AsRef<Path>>(path: P) -> Result<ReplayConnection>
Open an IBT file for replay.
Loads an iRacing telemetry file (IBT) and provides a connection that behaves identically to live telemetry, including frame streaming and session info access.
§Arguments
path- Path to the IBT file
§Errors
Returns an error if:
- File does not exist or is not readable
- File is not a valid IBT format
- File header is corrupted
§Example
use pitwall::Pitwall;
let connection = Pitwall::open("race.ibt").await?;Auto Trait Implementations§
impl Freeze for Pitwall
impl RefUnwindSafe for Pitwall
impl Send for Pitwall
impl Sync for Pitwall
impl Unpin for Pitwall
impl UnwindSafe for Pitwall
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