Trait fix_getters_utils::collectors::collection::GetterCollection [−][src]
pub trait GetterCollection { fn clone(this: &Self) -> Self; fn disable_doc_alias(&mut self); fn offset(&self) -> usize; fn set_offset(&mut self, offset: usize); }
Expand description
A trait
that allows intergrating with Getter
Collections.
Parsing Rust code involves different components in order to
deal with regular code, macros and code in documentation. Implementing
this trait
on data structure involved in collecting Getter
s
eases the integration in these components.
Parsing the documentation code is like parsing a single Rust file:
it can invole struct
definitions and implementations as well as
macro
s. However, the code appears at a particular offset
in the
actual Rust file.
See also TokenStreamGetterCollector
,
SyntaxTreeGetterCollector
and
DocCodeGetterCollector
.
Required methods
fn clone(this: &Self) -> Self
[src]
fn clone(this: &Self) -> Self
[src]Clones a view on the provided shared collection.
Any Getter
added to the resulting collection
must also be visible to this
.
fn disable_doc_alias(&mut self)
[src]
fn disable_doc_alias(&mut self)
[src]Disables the generation of the doc alias attribute.
For any Getter
added via this view of the
GetterCollection
, the doc alias attribute will not be generated,
regardless of the position in the Rust code.
This facilitates the renaming of Getter
s in
documentation code.
fn set_offset(&mut self, offset: usize)
[src]
fn set_offset(&mut self, offset: usize)
[src]Defines the offset for this view in the whole Rust file.