pub struct Field<'ast, State> { /* private fields */ }Expand description
A Nickel record field being constructed
Implementations§
Source§impl<'ast, A> Field<'ast, A>
impl<'ast, A> Field<'ast, A>
Sourcepub fn some_doc(self, some_doc: Option<impl AsRef<str>>) -> Self
pub fn some_doc(self, some_doc: Option<impl AsRef<str>>) -> Self
Attach documentation metadata to the field, optionally
Sourcepub fn not_exported(self, not_exported: bool) -> Self
pub fn not_exported(self, not_exported: bool) -> Self
Mark the field as not_exported or not, depending on the argument
Sourcepub fn contracts<I>(self, contracts: I) -> Selfwhere
I: IntoIterator<Item = Type<'ast>>,
pub fn contracts<I>(self, contracts: I) -> Selfwhere
I: IntoIterator<Item = Type<'ast>>,
Attach multiple contracts to the field
Sourcepub fn priority(self, priority: MergePriority) -> Self
pub fn priority(self, priority: MergePriority) -> Self
Set the field’s merge priority
Sourcepub fn metadata(self, metadata: FieldMetadata<'ast>) -> Self
pub fn metadata(self, metadata: FieldMetadata<'ast>) -> Self
Set the field’s metadata all at once
Source§impl<'ast> Field<'ast, Incomplete>
impl<'ast> Field<'ast, Incomplete>
Trait Implementations§
Auto Trait Implementations§
impl<'ast, State> Freeze for Field<'ast, State>where
State: Freeze,
impl<'ast, State> RefUnwindSafe for Field<'ast, State>where
State: RefUnwindSafe,
impl<'ast, State> Send for Field<'ast, State>where
State: Send,
impl<'ast, State> Sync for Field<'ast, State>where
State: Sync,
impl<'ast, State> Unpin for Field<'ast, State>where
State: Unpin,
impl<'ast, State> UnsafeUnpin for Field<'ast, State>where
State: UnsafeUnpin,
impl<'ast, State> UnwindSafe for Field<'ast, State>where
State: UnwindSafe,
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more