pub struct ModelRewrites {
pub field_names: JsonFieldNames,
pub packages: BTreeMap<String, JsonFieldNames>,
pub int64_module: Option<String>,
pub json_value_module: Option<String>,
pub fields: BTreeMap<String, PackageFields>,
}Expand description
The rewrites to apply to the buffa model output.
Fields§
§field_names: JsonFieldNamesField-name style of every package not in packages.
packages: BTreeMap<String, JsonFieldNames>Field-name style per proto package (my.pkg.v1), overriding
field_names. A package file is <package>.rs.
int64_module: Option<String>Path of the json_int64 helper module (e.g. crate::models::json_int64); when set,
buffa’s 64-bit integer helpers are pointed at it.
json_value_module: Option<String>Path of the json_value helper module (e.g. crate::models::json_value); when set, the
free-form JSON fields serialize through it.
fields: BTreeMap<String, PackageFields>The fields with options that change their JSON, by proto package; see field_options.
Implementations§
Trait Implementations§
Source§impl Clone for ModelRewrites
impl Clone for ModelRewrites
Source§impl Debug for ModelRewrites
impl Debug for ModelRewrites
Auto Trait Implementations§
impl Freeze for ModelRewrites
impl RefUnwindSafe for ModelRewrites
impl Send for ModelRewrites
impl Sync for ModelRewrites
impl Unpin for ModelRewrites
impl UnsafeUnpin for ModelRewrites
impl UnwindSafe for ModelRewrites
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more