pub struct Config { /* private fields */ }Expand description
A config for configuring how tinc builds / generates code.
Implementations§
Source§impl Config
impl Config
Sourcepub fn new_with_out_dir(mode: Mode, out_dir: impl Into<PathBuf>) -> Self
pub fn new_with_out_dir(mode: Mode, out_dir: impl Into<PathBuf>) -> Self
Make a new config with a given mode.
Sourcepub fn disable_tinc_include(&mut self) -> &mut Self
pub fn disable_tinc_include(&mut self) -> &mut Self
Disable tinc auto-include. By default tinc will add its own annotations into the include path of protoc.
Sourcepub fn disable_root_module(&mut self) -> &mut Self
pub fn disable_root_module(&mut self) -> &mut Self
Disable the root module generation
which allows for tinc::include_protos!() without
providing a package.
Sourcepub fn btree_map(&mut self, path: impl Display) -> &mut Self
pub fn btree_map(&mut self, path: impl Display) -> &mut Self
Specify a path to generate a BTreeMap instead of a HashMap for proto map.
Sourcepub fn bytes(&mut self, path: impl Display) -> &mut Self
pub fn bytes(&mut self, path: impl Display) -> &mut Self
Specify a path to generate bytes::Bytes instead of Vec<u8> for proto bytes.
Sourcepub fn boxed(&mut self, path: impl Display) -> &mut Self
pub fn boxed(&mut self, path: impl Display) -> &mut Self
Specify a path to wrap around a Box instead of including it directly into the struct.
Sourcepub fn float_with_non_finite_vals(&mut self, path: impl Display) -> &mut Self
pub fn float_with_non_finite_vals(&mut self, path: impl Display) -> &mut Self
Specify a path to float/double field (or derivative, like repeated float/double) that must use serializer/deserializer with non-finite values support (NaN/Infinity).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl !Send for Config
impl !Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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> 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