pub struct Extend {
pub ty: Type,
pub methods: Vec<Function>,
pub span: Span,
}Expand description
Extension methods: extend Type { fn method(&self) -> T { ... } }
Adds methods to types you don’t own — inspired by Kotlin/Swift/C#.
Fields§
§ty: Type§methods: Vec<Function>§span: SpanTrait Implementations§
impl StructuralPartialEq for Extend
Auto Trait Implementations§
impl Freeze for Extend
impl RefUnwindSafe for Extend
impl Send for Extend
impl Sync for Extend
impl Unpin for Extend
impl UnwindSafe for Extend
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