[ 
https://issues.apache.org/jira/browse/THRIFT-5458?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jorge Leitão updated THRIFT-5458:
---------------------------------
    Summary: Return how many bytes were written  (was: Return how many bytes 
were read and written)

> Return how many bytes were written
> ----------------------------------
>
>                 Key: THRIFT-5458
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5458
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Rust - Library
>            Reporter: Jorge Leitão
>            Priority: Major
>
> Currently we ignore how many bytes were read in total after parsing objects. 
> However, in some applications, this information is very useful as it allows 
> to know how many bytes were moved in a file descriptor.
> The current hack to this is to require the trait `Seek` and perform 2 seeks, 
> one before reading and one after reading. However, not all readers support 
> cheap seek operations.
> I would like to propose that we change our signatures of `read_` and `write_` 
> to return Result<usize>, with the number of bytes read and write respectively.
> The calculation of the number of bytes is just a sum over all bytes read, 
> which amounts to summing the results of the internal `read_` calls.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to