pub struct Config {
pub err_ty: Path,
pub ext_err_ty: Path,
pub fn_prefix: Ident,
pub ty_prefix: Ident,
pub defs: Path,
pub target: String,
}Expand description
Configures code generation.
Fields§
§err_ty: PathThe error type to use.
Must implement aranya_capi_core::ErrorCode.
ext_err_ty: PathThe extended error type to use.
Must implement aranya_capi_core::ExtendedError.
fn_prefix: IdentFunction identifier prefix.
E.g., os converts fn foo to fn os_foo.
ty_prefix: IdentType identifier prefix.
E.g., Os converts struct Foo to struct OsFoo.
defs: PathPath to the module where defs live.
target: StringThe TARGET environment variable.
Implementations§
Source§impl Config
impl Config
Sourcepub fn generate(self, source: &str) -> Result<TokenStream, BuildError>
pub fn generate(self, source: &str) -> Result<TokenStream, BuildError>
Generates code.
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 UnsafeUnpin 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