chromium/third_party/abseil-cpp/absl/status/internal/status_internal.cc

// Copyright 2023 The Abseil Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include "absl/status/internal/status_internal.h"

#include <atomic>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <memory>
#include <string>
#include <utility>

#include "absl/base/attributes.h"
#include "absl/base/config.h"
#include "absl/base/macros.h"
#include "absl/base/nullability.h"
#include "absl/debugging/stacktrace.h"
#include "absl/debugging/symbolize.h"
#include "absl/memory/memory.h"
#include "absl/status/status.h"
#include "absl/status/status_payload_printer.h"
#include "absl/strings/cord.h"
#include "absl/strings/escaping.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h"
#include "absl/strings/str_split.h"
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"

namespace absl {
ABSL_NAMESPACE_BEGIN
namespace status_internal {

void StatusRep::Unref() const {}

static absl::optional<size_t> FindPayloadIndexByUrl(
    const Payloads* payloads, absl::string_view type_url) {}

absl::optional<absl::Cord> StatusRep::GetPayload(
    absl::string_view type_url) const {}

void StatusRep::SetPayload(absl::string_view type_url, absl::Cord payload) {}

StatusRep::EraseResult StatusRep::ErasePayload(absl::string_view type_url) {}

void StatusRep::ForEachPayload(
    absl::FunctionRef<void(absl::string_view, const absl::Cord&)> visitor)
    const {}

std::string StatusRep::ToString(StatusToStringMode mode) const {}

bool StatusRep::operator==(const StatusRep& other) const {}

absl::Nonnull<StatusRep*> StatusRep::CloneAndUnref() const {}

// Convert canonical code to a value known to this binary.
absl::StatusCode MapToLocalCode(int value) {}

absl::Nonnull<std::string*> MakeCheckFailString(
    absl::Nonnull<const absl::Status*> status,
    absl::Nonnull<const char*> prefix) {}

}  // namespace status_internal

ABSL_NAMESPACE_END
}  // namespace absl