pub enum Closure {
Expr {
args: Vec<(Param, Kind)>,
returns: Option<Kind>,
body: Expr,
captures: Variables,
},
Builtin(Arc<dyn BuiltinClosureObj>),
}Variants§
Expr
Builtin(Arc<dyn BuiltinClosureObj>)
Implementations§
Trait Implementations§
Source§impl<'de, F> BorrowDecode<'de, F> for Closure
impl<'de, F> BorrowDecode<'de, F> for Closure
fn borrow_decode(_: &mut BorrowReader<'de>) -> Result<Self, DecodeError>
Source§impl DeserializeRevisioned for Closure
impl DeserializeRevisioned for Closure
impl Eq for Closure
Source§impl Ord for Closure
impl Ord for Closure
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Closure
impl PartialOrd for Closure
Source§impl Revisioned for Closure
impl Revisioned for Closure
Source§impl SerializeRevisioned for Closure
impl SerializeRevisioned for Closure
Source§impl SkipRevisioned for Closure
impl SkipRevisioned for Closure
fn skip_revisioned<R: Read>(_reader: &mut R) -> Result<(), Error>
Source§fn skip_revisioned_slice(r: &mut SliceReader<'_>) -> Result<(), Error>
fn skip_revisioned_slice(r: &mut SliceReader<'_>) -> Result<(), Error>
Consume through bytes backed by
SliceReader without allocating a buffer for bulk segments. Read moreSource§impl WalkRevisioned for Closure
impl WalkRevisioned for Closure
Source§type Walker<'r, R: BorrowedReader + 'r> = LeafWalker<'r, Closure, R>
type Walker<'r, R: BorrowedReader + 'r> = LeafWalker<'r, Closure, R>
Walker produced by
walk_revisioned. Read moreSource§fn walk_revisioned<'r, R: BorrowedReader>(
reader: &'r mut R,
) -> Result<Self::Walker<'r, R>, Error>
fn walk_revisioned<'r, R: BorrowedReader>( reader: &'r mut R, ) -> Result<Self::Walker<'r, R>, Error>
Read the type’s revision-level prefix and return a walker positioned at
the start of the body. Read more
Auto Trait Implementations§
impl !Freeze for Closure
impl !RefUnwindSafe for Closure
impl !UnwindSafe for Closure
impl Send for Closure
impl Sync for Closure
impl Unpin for Closure
impl UnsafeUnpin for Closure
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.