#[non_exhaustive]pub enum Def {
Fn {
name: String,
params: Vec<(String, Ty)>,
ret: Option<Ty>,
},
Struct {
name: String,
},
Enum {
name: String,
},
Import {
name: String,
},
Identity {
name: String,
},
}Expand description
Something declared in the REPL (defs).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Fn
fn (with parameter and return types).
Fields
Struct
struct.
Enum
enum.
Import
import.
Identity
identity.
Trait Implementations§
Source§impl Display for Def
The one-line form of :defs (fn bonus(n: int) -> int, struct Prize, enum Mood, import std::math,
identity 案内人).
impl Display for Def
The one-line form of :defs (fn bonus(n: int) -> int, struct Prize, enum Mood, import std::math,
identity 案内人).
impl StructuralPartialEq for Def
Auto Trait Implementations§
impl Forget for Def
impl Freeze for Def
impl Move for Def
impl RefUnwindSafe for Def
impl Send for Def
impl Sync for Def
impl Unpin for Def
impl UnsafeUnpin for Def
impl UnwindSafe for Def
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