pub struct ResolvedFeatures {
pub field_presence: FieldPresence,
pub enum_type: EnumType,
pub repeated_field_encoding: RepeatedFieldEncoding,
pub utf8_validation: Utf8Validation,
pub message_encoding: MessageEncoding,
pub json_format: JsonFormat,
}Expand description
The resolved set of edition features for a protobuf element.
§Forward compatibility
This struct is intentionally not #[non_exhaustive]. It is
constructed via struct literals by buffa-codegen (workspace sibling,
always released in lockstep with this crate). Adding a new feature field
here requires a coordinated change in buffa-codegen::features::merge.
User code should not construct ResolvedFeatures directly — use the
*_defaults() associated functions instead.
Fields§
§field_presence: FieldPresence§enum_type: EnumType§repeated_field_encoding: RepeatedFieldEncoding§utf8_validation: Utf8Validation§message_encoding: MessageEncoding§json_format: JsonFormatImplementations§
Source§impl ResolvedFeatures
impl ResolvedFeatures
Sourcepub fn edition_2023_defaults() -> Self
pub fn edition_2023_defaults() -> Self
Default features for Edition 2023.
Sourcepub fn proto2_defaults() -> Self
pub fn proto2_defaults() -> Self
Features that replicate proto2 behavior.
Sourcepub fn proto3_defaults() -> Self
pub fn proto3_defaults() -> Self
Features that replicate proto3 behavior.
Trait Implementations§
Source§impl Clone for ResolvedFeatures
impl Clone for ResolvedFeatures
Source§fn clone(&self) -> ResolvedFeatures
fn clone(&self) -> ResolvedFeatures
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResolvedFeatures
impl Debug for ResolvedFeatures
Source§impl PartialEq for ResolvedFeatures
impl PartialEq for ResolvedFeatures
impl Copy for ResolvedFeatures
impl Eq for ResolvedFeatures
impl StructuralPartialEq for ResolvedFeatures
Auto Trait Implementations§
impl Freeze for ResolvedFeatures
impl RefUnwindSafe for ResolvedFeatures
impl Send for ResolvedFeatures
impl Sync for ResolvedFeatures
impl Unpin for ResolvedFeatures
impl UnsafeUnpin for ResolvedFeatures
impl UnwindSafe for ResolvedFeatures
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more