Introducing Google AI Edge Portal: Benchmark Edge AI at scale. Sign-up to request access during private preview.

litert::Expected

Summary

Constructors and Destructors

Expected(std::initializer_list< U > il)
Expected(Args &&... args)
Expected(const T & t)
Expected(T && t)
Expected(const Unexpected & err)
Expected(Unexpected && err)
Expected(const class Error & e)
Expected(Expected && other)
Expected(const Expected & other)
~Expected()

Public attributes

unexpected_
value_
T

Public functions

Error() const &
const class Error &
Error()&
class Error &
Error() const &&=delete
const class Error &&
Error()&&=delete
class Error &&
HasValue() const
bool
Value() const &
const T &
Value()&
T &
Value() const &&=delete
const T &&
Value()&&=delete
T &&
operator bool() const
operator*() const &
const T &
operator*()&
T &
operator*() const &&=delete
const T &&
operator*()&&=delete
T &&
operator->() const &
const T *
operator->()&
T *
operator->() const &&=delete
const T *
operator->()&&=delete
T *
operator=(Expected && other)
operator=(const Expected & other)

Public attributes

unexpected_

Unexpected unexpected_

value_

T value_

Public functions

Error

constclassError  & Error()const&

Error

class Error & Error()&

Error

constclassError  && Error()const&&=delete

Error

class Error && Error()&&=delete

Expected

 Expected(
 std::initializer_list< U > il
)

Expected

 Expected(
 Args &&... args
)

Expected

Expected(
constT & t
)

Expected

 Expected(
 T && t
)

Expected

Expected(
constUnexpected  & err
)

Expected

 Expected(
 Unexpected && err
)

Expected

Expected(
constclassError  & e
)

Expected

 Expected(
 Expected && other
)

Expected

Expected(
constExpected  & other
)

HasValue

boolHasValue()const

Value

constT & Value()const&

Value

T & Value()&

Value

constT && Value()const&&=delete

Value

T && Value()&&=delete

operator bool

operatorbool()const

operator*

constT & operator*()const&

operator*

T & operator*()&

operator*

constT && operator*()const&&=delete

operator*

T && operator*()&&=delete

operator->

constT*operator->()const&

operator->

T * operator->()&

operator->

constT*operator->()const&&=delete

operator->

T * operator->()&&=delete

operator=

Expected & operator=(
 Expected && other
)

operator=

Expected  & operator=(
constExpected  & other
)

~Expected

 ~Expected()

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年05月14日 UTC.