Commit 8be32da3 authored by Filip Francetic's avatar Filip Francetic Committed by Facebook GitHub Bot

Add a comment explaining some confusing IOBuf functions

Summary: The len and bytes functions only operate on the current IOBuf, so add some comments explaining it.

Reviewed By: nanshu

Differential Revision: D30501776

fbshipit-source-id: 997dd77db52a3c11722efff8ae83b05e073e1285
parent 2c7411fe
...@@ -25,8 +25,10 @@ class IOBuf(Hashable): ...@@ -25,8 +25,10 @@ class IOBuf(Hashable):
def is_chained(self) -> bool: ... def is_chained(self) -> bool: ...
def chain_size(self) -> int: ... def chain_size(self) -> int: ...
def chain_count(self) -> int: ... def chain_count(self) -> int: ...
# Note that this gives you the bytes of the current IOBuf, for the whole IOBuf iterate through it or do b''.join(iobuf)
def __bytes__(self) -> bytes: ... def __bytes__(self) -> bytes: ...
def __bool__(self) -> bool: ... def __bool__(self) -> bool: ...
# Note that this gives you the size of the current IOBuf, for the whole IOBuf use chain_size
def __len__(self) -> int: ... def __len__(self) -> int: ...
def __iter__(self) -> Iterator[memoryview]: ... def __iter__(self) -> Iterator[memoryview]: ...
def __hash__(self) -> int: ... def __hash__(self) -> int: ...
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment