mirror of
https://github.com/protocolbuffers/protobuf
synced 2026-08-26 02:23:14 -04:00
We already renamed many of these to avoid collisions with names like `AsMut` to be `ProtoAsMut`, I think its even better to throw away the name to only bring in the traits for people to be able to use the behavior. PiperOrigin-RevId: 805477478
22 lines
961 B
Rust
22 lines
961 B
Rust
// 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
|
|
|
|
//! Prelude for the Protobuf Rust API.
|
|
//!
|
|
//! This module contains only the proto! macro and traits which define very
|
|
//! common fns that on messages (fns that would be methods on a base class in
|
|
//! other languages).
|
|
//!
|
|
//! All traits here have `Proto` prefixed on them, as the intent of this prelude
|
|
//! is to make the methods callable on message instances: if the traits are
|
|
//! named for generic reasons, they should be explicitly imported from the
|
|
//! `protobuf::` crate instead.
|
|
|
|
pub use crate::{
|
|
proto, AsMut as _, AsView as _, Clear as _, ClearAndParse as _, CopyFrom as _, IntoMut as _,
|
|
IntoView as _, MergeFrom as _, Parse as _, Serialize as _, TakeFrom as _,
|
|
};
|