[−][src]Struct zamm_yang::codegen::template::basic::ImplementationFragment
Fragment for a trait implementation.
Fields
trait_cfg: StructConfig
Config for the trait being implemented.
struct_cfg: StructConfig
Config for the struct the trait is being implemented for.
same_file_as_trait: bool
Whether this implementation is in the same file the trait is defined in.
same_file_as_struct: bool
Whether this implementation is in the same file the struct is defined in.
declaration: ItemDeclaration
Declaration fragment for this trait.
content: Rc<RefCell<AppendedFragment>>
Actual internal code fragments for the trait.
Implementations
impl ImplementationFragment
[src]
pub fn new(trait_cfg: StructConfig, struct_cfg: StructConfig) -> Self
[src]
Create a new trait implementation for the given trait and struct.
pub fn mark_same_file_as_trait(&mut self)
[src]
Mark this implementation as being in the same file as the trait definition.
Matters for import purposes.
pub fn mark_same_file_as_struct(&mut self)
[src]
Mark this implementation as being in the same file as the struct definition.
Matters for import purposes.
pub fn append(&mut self, fragment: Rc<RefCell<dyn CodeFragment>>)
[src]
Add a fragment to the internals of this implementation.
Trait Implementations
impl CodeFragment for ImplementationFragment
[src]
impl Default for ImplementationFragment
[src]
impl ItemDeclarationAPI for ImplementationFragment
[src]
pub fn mark_as_public(&mut self)
[src]
pub fn is_public(&self) -> bool
[src]
pub fn add_attribute(&mut self, attribute: String)
[src]
pub fn document(&mut self, documentation: String)
[src]
pub fn set_body(&mut self, body: Rc<RefCell<dyn CodeFragment>>)
[src]
pub fn mark_as_declare_only(&mut self)
[src]
pub fn mark_for_full_implementation(&mut self)
[src]
Auto Trait Implementations
impl !RefUnwindSafe for ImplementationFragment
impl !Send for ImplementationFragment
impl !Sync for ImplementationFragment
impl Unpin for ImplementationFragment
impl !UnwindSafe for ImplementationFragment
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,
pub 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, 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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,