Function init [src]

You must call deinit to free the internal buffer of the iterator after you are done.

Prototype

pub fn init(allocator: Allocator) InitError!ArgIteratorWasi

Parameters

allocator: Allocator

Possible Errors

OutOfMemory
Unexpected UnexpectedError

The Operating System returned an undocumented error code.

This error is in theory not possible, but it would be better to handle this error than to invoke undefined behavior.

When this error code is observed, it usually means the Zig Standard Library needs a small patch to add the error code to the error set for the respective function.

Source

pub fn init(allocator: Allocator) InitError!ArgIteratorWasi { const fetched_args = try ArgIteratorWasi.internalInit(allocator); return ArgIteratorWasi{ .allocator = allocator, .index = 0, .args = fetched_args, }; }