proxygen
ObservingHandlerTest::MockIntToByteEncoder Class Reference
Inheritance diagram for ObservingHandlerTest::MockIntToByteEncoder:
wangle::MessageToByteEncoder< int > wangle::OutboundHandler< int, std::unique_ptr< folly::IOBuf > > wangle::HandlerBase< OutboundHandlerContext< std::unique_ptr< folly::IOBuf > > >

Public Member Functions

std::unique_ptr< IOBufencode (int &data) override
 
- Public Member Functions inherited from wangle::MessageToByteEncoder< int >
folly::Future< folly::Unitwrite (Context *ctx, intmsg) override
 
- Public Member Functions inherited from wangle::OutboundHandler< int, std::unique_ptr< folly::IOBuf > >
 ~OutboundHandler () override=default
 
virtual folly::Future< folly::UnitwriteException (Context *ctx, folly::exception_wrapper e)
 
virtual folly::Future< folly::Unitclose (Context *ctx)
 
- Public Member Functions inherited from wangle::HandlerBase< OutboundHandlerContext< std::unique_ptr< folly::IOBuf > > >
virtual ~HandlerBase ()=default
 
virtual void attachPipeline (OutboundHandlerContext< std::unique_ptr< folly::IOBuf > > *)
 
virtual void detachPipeline (OutboundHandlerContext< std::unique_ptr< folly::IOBuf > > *)
 
OutboundHandlerContext< std::unique_ptr< folly::IOBuf > > * getContext ()
 

Additional Inherited Members

- Public Types inherited from wangle::MessageToByteEncoder< int >
typedef OutboundHandler< int, std::unique_ptr< folly::IOBuf > >::Context Context
 
- Public Types inherited from wangle::OutboundHandler< int, std::unique_ptr< folly::IOBuf > >
typedef folly::Unit rin
 
typedef folly::Unit rout
 
typedef int win
 
typedef std::unique_ptr< folly::IOBufwout
 
typedef OutboundHandlerContext< std::unique_ptr< folly::IOBuf > > Context
 
- Static Public Attributes inherited from wangle::OutboundHandler< int, std::unique_ptr< folly::IOBuf > >
static const HandlerDir dir
 

Detailed Description

Definition at line 26 of file ObservingHandlerTest.cpp.

Member Function Documentation

std::unique_ptr<IOBuf> ObservingHandlerTest::MockIntToByteEncoder::encode ( int &  data)
inlineoverridevirtual

Implements wangle::MessageToByteEncoder< int >.

Definition at line 28 of file ObservingHandlerTest.cpp.

References folly::IOBuf::copyBuffer().

28  {
29  return IOBuf::copyBuffer(folly::to<std::string>(data));
30  }
std::unique_ptr< IOBuf > copyBuffer(const folly::IOBuf &buf)
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43

The documentation for this class was generated from the following file: