Namespaces

Records

Functions

  • template <typename T>
    span<const std::byte, sizeof(T)> ObjectAsBytes (const T & obj)

    Gets a read-only `pw::span

    <const

    std::byte>` (`ConstByteSpan`) view of an

    object.

    This function is only available for types where it always safe to rely on

    the underlying bytes of the object, i.e. serializable objects designed to be

    sent over the wire. It cannot be used with, for example, types that include

    padding bytes, since those are indeterminate and may leak information.

    For types that do not meet these criteria, it is still possible to represent

    them as bytes using `pw::as_bytes`, albeit in a manner that is unsafe for

    serialization.

    The returned span has a static extent.

    Defined at line 45 of file ../../third_party/pigweed/src/pw_bytes/public/pw_bytes/span.h

  • template <typename T>
    span<std::byte, sizeof(T)> ObjectAsWritableBytes (T & obj)

    Gets a writable `pw::span

    <std

    ::byte>` (`ByteSpan`) view of an object.

    This function is only available for types where it always safe to rely on

    the underlying bytes of the object, i.e. serializable objects designed to be

    sent over the wire. It cannot be used with, for example, types that include

    padding bytes, since those are indeterminate and may leak information.

    For types that do not meet these criteria, it is still possible to represent

    them as bytes using `pw::as_writable_bytes`, albeit in a manner that is

    unsafe for serialization.

    The returned span has a static extent.

    Defined at line 71 of file ../../third_party/pigweed/src/pw_bytes/public/pw_bytes/span.h

  • Status OkStatus ()

    Operation succeeded.

    Equivalent to `Status()` or `Status(PW_STATUS_OK)`. This function is used

    instead of a `Status::Ok()` function, which would be too similar to

    `Status::ok()`.

    Defined at line 450 of file ../../third_party/pigweed/src/pw_status/public/pw_status/status.h

  • bool operator== (const Status & lhs, const Status & rhs)

    Defined at line 452 of file ../../third_party/pigweed/src/pw_status/public/pw_status/status.h

  • bool operator!= (const Status & lhs, const Status & rhs)

    Defined at line 456 of file ../../third_party/pigweed/src/pw_status/public/pw_status/status.h