pub struct PreludeEntry {
pub name: &'static str,
pub doc: &'static str,
pub is_variant_ctor: bool,
}Expand description
One prelude symbol: its name and a one-line description.
Fields§
§name: &'static str§doc: &'static str§is_variant_ctor: boolWhether this name is an enum variant constructor rather than an
ordinary value. Some and None are Option’s two variants, declared
by the prelude rather than by an enum item — and a consumer that has
to tell a constructor from a binding cannot do it from the type
(var A = None has Option’s type too), so the declaration says.
Implementations§
Source§impl PreludeEntry
impl PreludeEntry
pub const fn new(name: &'static str, doc: &'static str) -> PreludeEntry
Sourcepub const fn variant(name: &'static str, doc: &'static str) -> PreludeEntry
pub const fn variant(name: &'static str, doc: &'static str) -> PreludeEntry
An entry that constructs an enum variant.
Trait Implementations§
Source§impl Clone for PreludeEntry
impl Clone for PreludeEntry
Source§fn clone(&self) -> PreludeEntry
fn clone(&self) -> PreludeEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PreludeEntry
Auto Trait Implementations§
impl Freeze for PreludeEntry
impl RefUnwindSafe for PreludeEntry
impl Send for PreludeEntry
impl Sync for PreludeEntry
impl Unpin for PreludeEntry
impl UnsafeUnpin for PreludeEntry
impl UnwindSafe for PreludeEntry
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