pub struct GeneratedFile {
pub relative_path: String,
pub contents: String,
}Expand description
One file a target generator produces. relative_path is relative to the
--out-dir the CLI was given — a single-file target (Rust) returns one
entry named from stem (e.g. "order-fulfillment.rs"); a target whose
ecosystem expects a package/directory layout (Java, Go, …) returns
several, with relative_path encoding that structure (e.g.
"com/example/OrderFulfillment.java"). The registry-facing side (the
CLI) never special-cases how many files a target produces — it just
writes whatever list comes back, creating parent directories as needed.
Fields§
§relative_path: String§contents: StringImplementations§
Trait Implementations§
Source§impl Clone for GeneratedFile
impl Clone for GeneratedFile
Source§fn clone(&self) -> GeneratedFile
fn clone(&self) -> GeneratedFile
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 GeneratedFile
impl Debug for GeneratedFile
impl Eq for GeneratedFile
Source§impl PartialEq for GeneratedFile
impl PartialEq for GeneratedFile
impl StructuralPartialEq for GeneratedFile
Auto Trait Implementations§
impl Freeze for GeneratedFile
impl RefUnwindSafe for GeneratedFile
impl Send for GeneratedFile
impl Sync for GeneratedFile
impl Unpin for GeneratedFile
impl UnsafeUnpin for GeneratedFile
impl UnwindSafe for GeneratedFile
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.