芝麻web文件管理V1.00
编辑当前文件:/home/rejoandoctor/test.joruridoctor.com/vendor/graham-campbell/result-type/src/Result.php
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace GrahamCampbell\ResultType; /** * @template T * @template E */ abstract class Result { /** * Get the success option value. * * @return \PhpOption\Option
*/ abstract public function success(); /** * Map over the success value. * * @template S * * @param callable(T):S $f * * @return \GrahamCampbell\ResultType\Result
*/ abstract public function map(callable $f); /** * Flat map over the success value. * * @template S * @template F * * @param callable(T):\GrahamCampbell\ResultType\Result
$f * * @return \GrahamCampbell\ResultType\Result
*/ abstract public function flatMap(callable $f); /** * Get the error option value. * * @return \PhpOption\Option
*/ abstract public function error(); /** * Map over the error value. * * @template F * * @param callable(E):F $f * * @return \GrahamCampbell\ResultType\Result
*/ abstract public function mapError(callable $f); }