[−][src]Struct paperclip::v2::codegen::DefaultEmitter
Default emitter for anything that implements Schema
trait.
This doesn't do anything special, as Emitter
trait methods take
care of all the heavy load.
Trait Implementations
impl<S: Schema + Debug> Emitter for DefaultEmitter<S>
[src]
type Definition = S
The associated Schema
implementor.
fn state(&self) -> &EmitterState
[src]
fn generate(&self, api: &Api<Self::Definition>) -> Result<(), Error>
[src]
Entrypoint for emitter. Given an API spec, generate code inside Rust modules in the configured working directory. Read more
fn def_ns_name<'a>(
&self,
def: &'a Self::Definition
) -> Result<Box<dyn Iterator<Item = String> + 'a>, Error>
[src]
&self,
def: &'a Self::Definition
) -> Result<Box<dyn Iterator<Item = String> + 'a>, Error>
Returns an iterator of path components for the given definition. Read more
fn def_name(&self, def: &Self::Definition) -> Result<String, Error>
[src]
Returns the CamelCase name for the given definition. Read more
fn def_mod_path(&self, def: &Self::Definition) -> Result<PathBuf, Error>
[src]
Returns the module path (from working directory) for the given definition. Read more
fn build_def(
&self,
def: &Self::Definition,
define: bool
) -> Result<EmittedUnit, Error>
[src]
&self,
def: &Self::Definition,
define: bool
) -> Result<EmittedUnit, Error>
Builds a given definition. Also takes a bool
to specify whether we're planning to define a Rust type or whether we're reusing an existing type. Read more
impl<S> From<EmitterState> for DefaultEmitter<S>
[src]
fn from(state: EmitterState) -> Self
[src]
Auto Trait Implementations
impl<S> !Send for DefaultEmitter<S>
impl<S> !Sync for DefaultEmitter<S>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,