pub struct ImplBlock {
pub generic_parameters: Vec<GenericParameter>,
pub target_type: Type,
pub callable: Callable,
pub const_fn: bool,
}Expand description
Makes a type callable: impl Type -> R { body }.
Constructing the type auto-evaluates the body. Each type has at most one impl block.
Fields§
§generic_parameters: Vec<GenericParameter>Generic type/const parameters.
target_type: TypeThe type being made callable.
callable: CallableReturn type and body.
const_fn: boolWhether this impl is evaluated at compile time (const fn).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ImplBlock
impl RefUnwindSafe for ImplBlock
impl Send for ImplBlock
impl Sync for ImplBlock
impl Unpin for ImplBlock
impl UnsafeUnpin for ImplBlock
impl UnwindSafe for ImplBlock
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