Enum genco::python::Python
[−]
[src]
pub enum Python<'el> { Imported { module: Cow<'el, str>, alias: Option<Cow<'el, str>>, name: Option<Cow<'el, str>>, }, }
Python token specialization.
Variants
Imported
An imported module.
Fields of Imported
module: Cow<'el, str> | Module of the imported name. |
alias: Option<Cow<'el, str>> | Alias of module. |
name: Option<Cow<'el, str>> | Name imported. If |
Methods
impl<'el> Python<'el>
[src]
fn alias<A: Into<Cow<'el, str>>>(self, new_alias: A) -> Python<'el>
[src]
Set alias for python element.
fn name<A: Into<Cow<'el, str>>>(self, new_name: A) -> Python<'el>
[src]
Set name for python element.
Trait Implementations
impl<'el> Debug for Python<'el>
[src]
impl<'el> Clone for Python<'el>
[src]
fn clone(&self) -> Python<'el>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'el> Custom for Python<'el>
[src]
type Extra = ()
Extra data associated with building a formatting element.
fn format(
&self,
out: &mut Formatter,
_extra: &mut Self::Extra,
_level: usize
) -> Result
[src]
&self,
out: &mut Formatter,
_extra: &mut Self::Extra,
_level: usize
) -> Result
Format the custom element.
fn quote_string(out: &mut Formatter, input: &str) -> Result
[src]
Performing quoting according to convention set by custom element.
fn write_file<'a>(
tokens: Tokens<'a, Self>,
out: &mut Formatter,
extra: &mut Self::Extra,
level: usize
) -> Result
[src]
tokens: Tokens<'a, Self>,
out: &mut Formatter,
extra: &mut Self::Extra,
level: usize
) -> Result
Write a file according to convention by custom element.