Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
initial Buf docs
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| =begin pod | ||
| =head1 Buf | ||
| class Buf does Positional { ... } | ||
| A C<Buf> (short for buffer) is a binary string, and generally returned from | ||
| low-level IO operations. In the abstract it is just a list of integers, so | ||
| for example indexing into a C<Buf> with C<.[$idx]> returns an C<Int>. | ||
| =head2 Methods | ||
| =head3 new | ||
| method new(*@codes) | ||
| Creates a C<Buf> from a list of integers. | ||
| =head3 Bool | ||
| multi method Bool(Buf:D:) | ||
| Returns C<False> if and only if the buffer is empty. | ||
| =head3 elems | ||
| multi method elems(Buf:D:) returns Int:D | ||
| Returns the number of elements of the buffer. | ||
| =end pod |