pub struct DartExtension {
pub name: Option<String>,
pub on_type: DartType,
pub methods: Vec<DartFunction>,
pub getters: Vec<DartFunction>,
}Expand description
A Dart extension method block.
Fields§
§name: Option<String>§on_type: DartType§methods: Vec<DartFunction>§getters: Vec<DartFunction>Implementations§
Source§impl DartExtension
impl DartExtension
pub fn new(on_type: DartType) -> Self
pub fn named(self, name: impl Into<String>) -> Self
pub fn add_method(&mut self, m: DartFunction)
pub fn add_getter(&mut self, g: DartFunction)
pub fn emit(&self, backend: &DartBackend, indent_level: usize) -> String
Trait Implementations§
Source§impl Clone for DartExtension
impl Clone for DartExtension
Source§fn clone(&self) -> DartExtension
fn clone(&self) -> DartExtension
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DartExtension
impl RefUnwindSafe for DartExtension
impl Send for DartExtension
impl Sync for DartExtension
impl Unpin for DartExtension
impl UnsafeUnpin for DartExtension
impl UnwindSafe for DartExtension
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more