#![deny(unsafe_op_in_unsafe_fn)]
use std::fmt;
pub use crate::codegen_traits::{
create::Parse,
interop::{MessageMutInterop, MessageViewInterop, OwnedMessageInterop},
read::Serialize,
write::{Clear, ClearAndParse, CopyFrom, MergeFrom, TakeFrom},
Message, MessageMut, MessageView,
};
pub use crate::cord::{ProtoBytesCow, ProtoStringCow};
pub use crate::map::{Map, MapIter, MapMut, MapView, ProxiedInMapValue};
pub use crate::optional::Optional;
pub use crate::proxied::{
AsMut, AsView, IntoMut, IntoProxied, IntoView, Mut, MutProxied, MutProxy, Proxied, Proxy, View,
ViewProxy,
};
pub use crate::r#enum::{Enum, UnknownEnumValue};
pub use crate::repeated::{ProxiedInRepeated, Repeated, RepeatedIter, RepeatedMut, RepeatedView};
pub use crate::string::{ProtoBytes, ProtoStr, ProtoString, Utf8Error};
pub use protobuf_macros::proto_proc as proto;
pub mod prelude;
#[path = "internal.rs"]
pub mod __internal;
mod codegen_traits;
mod cord;
#[path = "enum.rs"]
mod r#enum;
mod map;
mod optional;
mod primitive;
mod proxied;
mod repeated;
mod string;
#[cfg(not(bzl))]
#[path = "upb/lib.rs"]
mod upb;
#[cfg(not(bzl))]
mod utf8;
#[cfg(bzl)]
#[allow(clippy::single_component_path_imports)]
use utf8;
#[no_mangle]
extern "C" fn __Disallow_Upb_And_Cpp_In_Same_Binary() {}
#[derive(Debug, Clone)]
pub struct ParseError;
impl std::error::Error for ParseError {}
impl fmt::Display for ParseError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "Couldn't deserialize given bytes into a proto")
}
}
#[derive(Debug, Clone)]
pub struct SerializeError;
impl std::error::Error for SerializeError {}
impl fmt::Display for SerializeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "Couldn't serialize proto into bytes (depth too deep or missing required fields)")
}
}