Add license headers

PiperOrigin-RevId: 647649755
pull/17269/head
Protobuf Team Bot 5 months ago committed by Copybara-Service
parent 643b0a625f
commit 219e8ead2f
  1. 8
      rust/upb/arena.rs
  2. 7
      rust/upb/array.rs
  3. 7
      rust/upb/ctype.rs
  4. 7
      rust/upb/extension_registry.rs
  5. 7
      rust/upb/lib.rs
  6. 7
      rust/upb/map.rs
  7. 7
      rust/upb/message.rs
  8. 7
      rust/upb/message_value.rs
  9. 7
      rust/upb/mini_table.rs
  10. 7
      rust/upb/opaque_pointee.rs
  11. 7
      rust/upb/owned_arena_box.rs
  12. 7
      rust/upb/string_view.rs
  13. 7
      rust/upb/wire.rs

@ -1,3 +1,10 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2024 Google LLC. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
use crate::opaque_pointee::opaque_pointee;
use std::alloc::{self, Layout};
use std::cell::UnsafeCell;
@ -149,7 +156,6 @@ impl Arena {
/// guaranteed to last until both `self` and `other` have been dropped.
/// The pointers returned by `Arena::alloc` will continue to be valid so
/// long as either `self` or `other` has not been dropped.
///
pub fn fuse(&self, other: &Arena) {
// SAFETY: `self.raw()` and `other.raw()` are both valid UPB arenas.
let success = unsafe { upb_Arena_Fuse(self.raw(), other.raw()) };

@ -1,3 +1,10 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2024 Google LLC. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
use crate::opaque_pointee::opaque_pointee;
use crate::{upb_MessageValue, upb_MutableMessageValue, CType, RawArena};
use std::ptr::NonNull;

@ -1,3 +1,10 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2024 Google LLC. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
// Transcribed from google3/third_party/upb/upb/base/descriptor_constants.h
#[repr(C)]
#[allow(dead_code)]

@ -1,3 +1,10 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2024 Google LLC. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
use crate::opaque_pointee::opaque_pointee;
use std::ptr::NonNull;

@ -1,3 +1,10 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2024 Google LLC. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
mod arena;
pub use arena::{upb_Arena, Arena, RawArena};

@ -1,3 +1,10 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2024 Google LLC. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
use crate::opaque_pointee::opaque_pointee;
use crate::{upb_MessageValue, CType, RawArena};
use std::ptr::NonNull;

@ -1,3 +1,10 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2024 Google LLC. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
use crate::opaque_pointee::opaque_pointee;
use crate::{upb_ExtensionRegistry, upb_MiniTable, upb_MiniTableField, RawArena};
use std::ptr::NonNull;

@ -1,3 +1,10 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2024 Google LLC. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
use crate::{RawArray, RawMap, RawMessage, StringView};
// Transcribed from google3/third_party/upb/upb/message/value.h

@ -1,3 +1,10 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2024 Google LLC. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
use crate::opaque_pointee::opaque_pointee;
use std::ptr::NonNull;

@ -1,3 +1,10 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2024 Google LLC. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
// Macro to create structs that will act as opaque pointees. These structs are
// never intended to be dereferenced in Rust.
// This is a workaround until stabilization of [`extern type`].

@ -1,3 +1,10 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2024 Google LLC. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
use crate::Arena;
use std::fmt::{self, Debug};
use std::ops::{Deref, DerefMut};

@ -1,3 +1,10 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2024 Google LLC. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
/// ABI compatible struct with upb_StringView.
///
/// Note that this has semantics similar to `std::string_view` in C++ and

@ -1,3 +1,10 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2024 Google LLC. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
use crate::{upb_ExtensionRegistry, upb_MiniTable, Arena, RawArena, RawMessage};
// LINT.IfChange(encode_status)

Loading…
Cancel
Save