proxygen
folly::detail::CheckTrailingSpace Struct Reference

#include <Conv.h>

Public Member Functions

Expected< Unit, ConversionCodeoperator() (StringPiece sp) const
 

Detailed Description

Definition at line 1423 of file Conv.h.

Member Function Documentation

Expected<Unit, ConversionCode> folly::detail::CheckTrailingSpace::operator() ( StringPiece  sp) const
inline

Definition at line 1424 of file Conv.h.

References folly::detail::enforceWhitespaceErr(), folly::makeUnexpected(), folly::SUCCESS, folly::unit, and UNLIKELY.

1424  {
1425  auto e = enforceWhitespaceErr(sp);
1426  if (UNLIKELY(e != ConversionCode::SUCCESS)) {
1427  return makeUnexpected(e);
1428  }
1429  return unit;
1430  }
constexpr Unexpected< typename std::decay< Error >::type > makeUnexpected(Error &&)
Definition: Expected.h:785
constexpr Unit unit
Definition: Unit.h:45
ConversionCode enforceWhitespaceErr(StringPiece sp)
Definition: Conv.h:118
#define UNLIKELY(x)
Definition: Likely.h:48

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