pub struct ClosureArgs {
pub kind: ClosureKind,
pub parent_args: Vec<GenericArg>,
pub parent_trait_refs: Vec<ImplExpr>,
pub untupled_sig: PolyFnSig,
pub tupled_sig: PolyFnSig,
pub upvar_tys: Vec<Ty>,
}
Expand description
Reflects [ty::ClosureArgs
]
Fields§
§kind: ClosureKind
The base kind of this closure. The kinds are ordered by inclusion: any Fn
works as an
FnMut
, and any FnMut
works as an FnOnce
.
parent_args: Vec<GenericArg>
The arguments to the parent (i.e., the item which defines the closure).
parent_trait_refs: Vec<ImplExpr>
The solved predicates from the parent (i.e., the item which defines the closure).
untupled_sig: PolyFnSig
The proper fn(A, B, C) -> D
signature of the closure.
tupled_sig: PolyFnSig
The signature of the closure as one input and one output, where the input arguments are
tupled. This is relevant to implementing the Fn*
traits.
upvar_tys: Vec<Ty>
The set of captured variables. Together they form the state of the closure.
Implementations§
source§impl ClosureArgs
impl ClosureArgs
Trait Implementations§
source§impl Clone for ClosureArgs
impl Clone for ClosureArgs
source§fn clone(&self) -> ClosureArgs
fn clone(&self) -> ClosureArgs
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ClosureArgs
impl Debug for ClosureArgs
source§impl<'de> Deserialize<'de> for ClosureArgs
impl<'de> Deserialize<'de> for ClosureArgs
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for ClosureArgs
impl Hash for ClosureArgs
source§impl JsonSchema for ClosureArgs
impl JsonSchema for ClosureArgs
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§impl Ord for ClosureArgs
impl Ord for ClosureArgs
source§fn cmp(&self, other: &ClosureArgs) -> Ordering
fn cmp(&self, other: &ClosureArgs) -> Ordering
1.21.0 · 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
source§impl PartialEq for ClosureArgs
impl PartialEq for ClosureArgs
source§impl PartialOrd for ClosureArgs
impl PartialOrd for ClosureArgs
source§impl Serialize for ClosureArgs
impl Serialize for ClosureArgs
impl Eq for ClosureArgs
impl StructuralPartialEq for ClosureArgs
Auto Trait Implementations§
impl Freeze for ClosureArgs
impl RefUnwindSafe for ClosureArgs
impl Send for ClosureArgs
impl Sync for ClosureArgs
impl Unpin for ClosureArgs
impl UnwindSafe for ClosureArgs
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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