[−][src]Struct polyhorn_cli::template::SourceTree
A source tree that is used to queue files that need to be generated.
Implementations
impl SourceTree[src]
pub fn new() -> SourceTree[src]
Creates a new empty source tree that can be written to disk.
pub fn copy(&mut self, name: &str, contents: &'static [u8])[src]
Queues a copy of the given contents to a file with the given name.
pub fn template(&mut self, name: &str, contents: &'static str)[src]
Queues an invocation of the given template that writes the result to a file with the given name.
pub fn len(&self) -> usize[src]
Returns the number of files that are queued for generation.
pub fn generate<'a>(
&'a self,
spec: &'a Spec,
destination_path: &'a Path
) -> SourceTreeIter<'a>ⓘNotable traits for SourceTreeIter<'a>
impl<'a> Iterator for SourceTreeIter<'a> type Item = Result<(), Error>;[src]
&'a self,
spec: &'a Spec,
destination_path: &'a Path
) -> SourceTreeIter<'a>ⓘ
Notable traits for SourceTreeIter<'a>
impl<'a> Iterator for SourceTreeIter<'a> type Item = Result<(), Error>;Returns an iterator that generates the source files of this source tree and writes them to the given destination path one-by-one.
Auto Trait Implementations
impl RefUnwindSafe for SourceTree
impl Send for SourceTree
impl Sync for SourceTree
impl Unpin for SourceTree
impl UnwindSafe for SourceTree
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,