#[macro_export]
macro_rules! unsafe_delegate_structural_with {
(
$( #[doc=$doc:expr] )*
impl $impl_params:tt $self:ty
where $where_clause:tt
self_ident=$this:ident;
$( specialization_params($($raw_mut_impl:tt)*); )?
delegating_to_type=$delegating_to_type:ty;
$($rest:tt)*
) => (
$crate::unsafe_delegate_structural_with_inner!{
$( #[doc=$doc] )*
impl $impl_params $self
where $where_clause
self_ident=$this;
specialization_params( $( $($raw_mut_impl)* )? );
delegating_to_type=$delegating_to_type;
$($rest)*
}
)
}
#[macro_export]
#[doc(hidden)]
macro_rules! unsafe_delegate_structural_with_inner {
(
$( #[doc=$doc:expr] )*
impl $impl_params:tt $self:ty
where $where_clause:tt
self_ident=$this:ident;
specialization_params $raw_mut_impl:tt;
delegating_to_type=$delegating_to_type:ty;
GetField $get_field_closure:block
$(
GetFieldMut
$( where[ $($mut_where_clause:tt)* ] )?
$unsafe_get_field_mut_closure:block
as_delegating_raw $as_field_mutref_closure:block
)?
$(
IntoField
$( where[ $($into_where_clause:tt)* ] )?
$into_field_closure:block
move_out_field $move_out_field_closure:block
DropFields = $drop_fields_param:tt $(;)?
)?
$(
FromStructural
$( where $from_struc_where:tt )?
{
$(converted_from=$converted_from:ty;)?
constructor = $constructor:expr;
}
)?
) => (
$crate::unsafe_delegate_structural_with_inner!{
inner-structural;
$( #[doc=$doc] )*
impl $impl_params $self
where $where_clause
self_ident=$this;
delegating_to_type=$delegating_to_type;
GetField $get_field_closure
}
$crate::unsafe_delegate_structural_with_inner!{
inner;
impl $impl_params $self
where $where_clause
self_ident=$this;
delegating_to_type=$delegating_to_type;
GetField $get_field_closure
}
$(
$crate::unsafe_delegate_structural_with_inner!{
inner;
impl $impl_params $self
where $where_clause
where[ $( $($mut_where_clause)* )? ]
self_ident=$this;
specialization_params $raw_mut_impl;
delegating_to_type=$delegating_to_type;
GetFieldMut $unsafe_get_field_mut_closure
as_delegating_raw $as_field_mutref_closure
}
)?
$(
$crate::unsafe_delegate_structural_with_inner!{
inner;
impl $impl_params $self
where $where_clause
where [ $( $($into_where_clause)* )? ]
self_ident=$this;
delegating_to_type=$delegating_to_type;
IntoField $into_field_closure
move_out_field $move_out_field_closure
}
$crate::unsafe_delegate_structural_with_inner!{
@drop_fields_impls
impl $impl_params $self
where $where_clause
where [ $( $($into_where_clause)* )? ]
self_ident=$this;
delegating_to_type=$delegating_to_type;
IntoField $into_field_closure
move_out_field $move_out_field_closure
DropFields = $drop_fields_param
}
)?
$(
$crate::unsafe_delegate_structural_with_inner!{
inner;
impl $impl_params $self
where $where_clause
$(where $from_struc_where)?
FromStructural {
$(converted_from = $converted_from;)?
converted_from = $delegating_to_type;
constructor = $constructor;
}
}
)?
);
(
inner-structural;
$( #[doc=$doc:expr] )*
impl[$($impl_params:tt)*] $self:ty
where [$($where_clause:tt)*]
self_ident=$this:ident;
delegating_to_type=$delegating_to_type:ty;
GetField $get_field_closure:block
)=>{
$( #[doc=$doc] )*
impl<$($impl_params)*> $crate::Structural for $self
where
$delegating_to_type: $crate::Structural,
$($where_clause)*
{}
};
(inner;
impl [$($impl_params:tt)*] $self:ty
where [$($where_clause:tt)*]
self_ident=$this:ident;
delegating_to_type=$delegating_to_type:ty;
GetField $get_field_closure:block
)=>{
unsafe impl<$($impl_params)* __V>
$crate::pmr::IsVariant<$crate::TStr<__V>>
for $self
where
$delegating_to_type: $crate::pmr::IsVariant<$crate::TStr<__V>>,
$($where_clause)*
{
fn is_variant_(&self,name:$crate::TStr<__V>)->bool{
let $this=self;
let field:&$delegating_to_type=$get_field_closure;
$crate::pmr::IsVariant::is_variant_(field,name)
}
}
unsafe impl<$($impl_params)*> $crate::pmr::VariantCount for $self
where
$delegating_to_type: $crate::pmr::VariantCount,
$($where_clause)*
{
type Count=$crate::pmr::VariantCountOut<$delegating_to_type>;
}
unsafe impl<$($impl_params)* __V,__F,__Ty>
$crate::GetVariantField<$crate::TStr<__V>,__F>
for $self
where
$delegating_to_type:
$crate::GetVariantField<$crate::TStr<__V>,__F,Ty=__Ty>,
$($where_clause)*
{
#[inline(always)]
fn get_vfield_(
&self,
vname: $crate::TStr<__V>,
fname: __F,
) -> Option<&$crate::GetVariantFieldType<
$delegating_to_type,
$crate::TStr<__V>,
__F
>>
{
let $this=self;
let field:&$delegating_to_type=$get_field_closure;
$crate::GetVariantField::get_vfield_(field,vname,fname)
}
}
impl<$($impl_params)* NP,__Ty> $crate::FieldType<NP> for $self
where
$delegating_to_type: $crate::FieldType<NP,Ty=__Ty>,
$($where_clause)*
{
type Ty=$crate::GetFieldType<$delegating_to_type, NP>;
}
impl<$($impl_params)* __F,__Ty>
$crate::GetField< __F>
for $self
where
$delegating_to_type: $crate::GetField<__F,Ty=__Ty>,
$($where_clause)*
{
#[inline(always)]
fn get_field_(
&self,
fname: __F,
)->&__Ty{
let $this=self;
let field:&$delegating_to_type=$get_field_closure;
$crate::GetField::get_field_(field,fname)
}
}
};
(inner;
impl [$($impl_params:tt)*] $self:ty
where [$($where_clause:tt)*]
where [$($mut_where_clause:tt)*]
self_ident=$this:ident;
specialization_params($($raw_mut_impl:tt)*);
delegating_to_type=$delegating_to_type:ty;
GetFieldMut $unsafe_get_field_mut_closure:block
as_delegating_raw $as_field_mutref_closure:block
)=>{
$crate::unsafe_delegate_structural_with_inner!{
inner-mut-0;
(
impl [$($impl_params)*] $self
where [$($where_clause)*]
where [$($mut_where_clause)*]
self_ident=$this;
specialization_params($($raw_mut_impl)*);
delegating_to_type=$delegating_to_type;
GetFieldMut $unsafe_get_field_mut_closure
as_delegating_raw $as_field_mutref_closure
)
}
};
(inner-mut-0; $inner_mut_stuff:tt )=>{
$crate::unsafe_delegate_structural_with_inner!{
inner-mut-1;
$inner_mut_stuff
$inner_mut_stuff
}
};
(inner-mut-1;
(
impl [$($impl_params:tt)*] $self:ty
where [$($where_clause:tt)*]
where [$($mut_where_clause:tt)*]
self_ident=$this:ident;
specialization_params( $(Sized)? );
delegating_to_type=$delegating_to_type:ty;
GetFieldMut $unsafe_get_field_mut_closure:block
as_delegating_raw $as_field_mutref_closure:block
)
$inner_mut_stuff:tt
)=>{
$crate::unsafe_delegate_structural_with_inner!{
inner-mut-2;
$inner_mut_stuff
struct_fn(
#[inline(always)]
unsafe fn get_field_raw_mut(
$this:*mut (),
fname: __F,
)->*mut __Ty
where
Self:Sized
{
let $this=$this as *mut Self;
let $this:*mut $delegating_to_type=
$as_field_mutref_closure;
<$delegating_to_type as
$crate::GetFieldMut<__F>
>::get_field_raw_mut( $this as *mut (),fname )
}
)
enum_fn(
#[inline(always)]
unsafe fn get_vfield_raw_mut_(
$this: *mut (),
vname: $crate::TStr<__V>,
fname: __F,
) -> Option<$crate::pmr::NonNull<__Ty>>
where
Self: Sized
{
let $this=$this as *mut Self;
let $this:*mut $delegating_to_type=
$as_field_mutref_closure;
<$delegating_to_type as
$crate::GetVariantFieldMut<$crate::TStr<__V>,__F>
>::get_vfield_raw_mut_( $this as *mut (),vname,fname)
}
)
impl()
}
};
(inner-mut-1;
(
impl [$($impl_params:tt)*] $self:ty
where [$($where_clause:tt)*]
where [$($mut_where_clause:tt)*]
self_ident=$this:ident;
specialization_params( ?Sized );
delegating_to_type=$delegating_to_type:ty;
GetFieldMut $unsafe_get_field_mut_closure:block
as_delegating_raw $as_field_mutref_closure:block
)
$inner_mut_stuff:tt
)=>{
$crate::unsafe_delegate_structural_with_inner!{
inner-mut-2;
$inner_mut_stuff
struct_fn(
#[inline(always)]
unsafe fn get_field_raw_mut(
$this:*mut (),
fname: __F,
)->*mut __Ty
where
Self:Sized
{
let $this=$this as *mut Self;
let $this:*mut $delegating_to_type=
$as_field_mutref_closure;
let func=<
$delegating_to_type as
$crate::GetFieldMut<__F>
>::get_field_raw_mut_fn(&*$this);
func( $this as *mut (),fname )
}
)
enum_fn(
#[inline(always)]
unsafe fn get_vfield_raw_mut_(
$this: *mut (),
vname: $crate::TStr<__V>,
fname: __F,
) -> Option<$crate::pmr::NonNull<__Ty>>
where
Self: Sized
{
let $this=$this as *mut Self;
let $this:*mut $delegating_to_type=
$as_field_mutref_closure;
let func=<
$delegating_to_type as
$crate::GetVariantFieldMut<$crate::TStr<__V>,__F>
>::get_vfield_raw_mut_fn(&*$this);
func( $this as *mut (),vname,fname )
}
)
impl()
}
};
(inner-mut-1;
(
impl [$($impl_params:tt)*] $self:ty
where [$($where_clause:tt)*]
where [$($mut_where_clause:tt)*]
self_ident=$this:ident;
specialization_params( specialize_cfg( $($specialize_cfg:tt)* ) );
delegating_to_type=$delegating_to_type:ty;
GetFieldMut $unsafe_get_field_mut_closure:block
as_delegating_raw $as_field_mutref_closure:block
)
$inner_mut_stuff:tt
)=>{
$crate::unsafe_delegate_structural_with_inner!{
inner-mut-2;
$inner_mut_stuff
struct_fn(
#[inline(always)]
unsafe fn get_field_raw_mut(
$this:*mut (),
fname: __F,
)->*mut __Ty
where
Self:Sized
{
<Self as
$crate::pmr::SpecGetFieldMut<__F>
>::get_field_raw_mut_inner(
$this,
fname,
)
}
)
enum_fn(
#[inline(always)]
unsafe fn get_vfield_raw_mut_(
$this: *mut (),
vname: $crate::TStr<__V>,
fname: __F,
) -> Option<$crate::pmr::NonNull<__Ty>>
where
Self: Sized
{
<Self as
$crate::pmr::SpecGetVariantFieldMut<$crate::TStr<__V>,__F>
>::get_vfield_raw_mut_inner(
$this,
vname,
fname,
)
}
)
impl(
unsafe impl<$($impl_params)* __F,__Ty>
$crate::pmr::SpecGetFieldMut< __F>
for $self
where
$delegating_to_type: $crate::GetFieldMut<__F,Ty=__Ty>,
$($mut_where_clause)*
$($where_clause)*
{
$crate::default_if!{
#[inline(always)]
cfg(all($($specialize_cfg)*))
unsafe fn get_field_raw_mut_inner(
$this:*mut (),
fname: __F,
)->*mut __Ty
where
Self:Sized
{
let $this=$this as *mut Self;
let $this:*mut $delegating_to_type=
$as_field_mutref_closure;
let func=<
$delegating_to_type as
$crate::GetFieldMut<__F>
>::get_field_raw_mut_fn(&*$this);
func( $this as *mut (),fname )
}
}
}
#[cfg(all($($specialize_cfg)*))]
unsafe impl<$($impl_params)* __F,__Ty>
$crate::pmr::SpecGetFieldMut< __F>
for $self
where
$delegating_to_type:
Sized +
$crate::GetFieldMut<__F,Ty=__Ty>,
$($mut_where_clause)*
$($where_clause)*
{
unsafe fn get_field_raw_mut_inner(
$this:*mut (),
fname: __F,
)->*mut __Ty
where
Self:Sized
{
let $this=$this as *mut Self;
let $this:*mut $delegating_to_type=
$as_field_mutref_closure;
<$delegating_to_type as
$crate::GetFieldMut<__F>
>::get_field_raw_mut( $this as *mut (),fname )
}
}
unsafe impl<$($impl_params)* __V,__F,__Ty>
$crate::pmr::SpecGetVariantFieldMut< $crate::TStr<__V>,__F>
for $self
where
$delegating_to_type:
$crate::GetVariantFieldMut<$crate::TStr<__V>,__F,Ty=__Ty>,
$($mut_where_clause)*
$($where_clause)*
{
$crate::default_if!{
#[inline(always)]
cfg(all($($specialize_cfg)*))
unsafe fn get_vfield_raw_mut_inner(
$this:*mut (),
vname: $crate::TStr<__V>,
fname: __F,
)->Option<$crate::pmr::NonNull<
__Ty
>>
where
Self:Sized
{
let $this=$this as *mut Self;
let $this:*mut $delegating_to_type=
$as_field_mutref_closure;
let func=<
$delegating_to_type as
$crate::GetVariantFieldMut<$crate::TStr<__V>,__F>
>::get_vfield_raw_mut_fn(&*$this);
func( $this as *mut (),vname,fname )
}
}
}
#[cfg(all($($specialize_cfg)*))]
unsafe impl<$($impl_params)* __V,__F,__Ty>
$crate::pmr::SpecGetVariantFieldMut< $crate::TStr<__V>,__F>
for $self
where
$delegating_to_type:
Sized +
$crate::GetVariantFieldMut<$crate::TStr<__V>,__F,Ty=__Ty>,
$($mut_where_clause)*
$($where_clause)*
{
unsafe fn get_vfield_raw_mut_inner(
$this:*mut (),
vname: $crate::TStr<__V>,
fname: __F,
)->Option<$crate::pmr::NonNull<__Ty>>
where
Self:Sized
{
let $this=$this as *mut Self;
let $this:*mut $delegating_to_type=
$as_field_mutref_closure;
<$delegating_to_type as
$crate::GetVariantFieldMut<$crate::TStr<__V>,__F>
>::get_vfield_raw_mut_( $this as *mut (),vname,fname )
}
}
)
}
};
(inner-mut-2;
(
impl [$($impl_params:tt)*] $self:ty
where [$($where_clause:tt)*]
where [$($mut_where_clause:tt)*]
self_ident=$this:ident;
specialization_params($($raw_mut_impl:tt)*);
delegating_to_type=$delegating_to_type:ty;
GetFieldMut $unsafe_get_field_mut_closure:block
as_delegating_raw $as_field_mutref_closure:block
)
struct_fn( $($raw_ptr_fn:tt)* )
enum_fn( $($raw_enum_ptr_fn:tt)* )
impl( $($raw_ptr_impl:tt)* )
)=>{
unsafe impl<$($impl_params)* __F,__Ty>
$crate::GetFieldMut<__F>
for $self
where
$self: Sized,
$delegating_to_type:
$crate::GetFieldMut<__F,Ty=__Ty>,
$($where_clause)*
$($mut_where_clause)*
{
#[inline(always)]
fn get_field_mut_(
&mut self,
fname: __F,
)->&mut __Ty {
let $this=self;
let field:&mut $delegating_to_type=$unsafe_get_field_mut_closure;
<$delegating_to_type as
$crate::GetFieldMut<_>
>::get_field_mut_(field,fname)
}
$($raw_ptr_fn)*
#[inline(always)]
fn get_field_raw_mut_fn(
&self
)->$crate::field::GetFieldRawMutFn<
__F,
__Ty,
>{
<Self as $crate::GetFieldMut<__F>>::get_field_raw_mut
}
}
unsafe impl<$($impl_params)* __V,__F,__Ty>
$crate::GetVariantFieldMut<$crate::TStr<__V>,__F>
for $self
where
$self: Sized,
$delegating_to_type: $crate::GetVariantFieldMut<$crate::TStr<__V>,__F,Ty=__Ty>,
$($where_clause)*
$($mut_where_clause)*
{
#[inline(always)]
fn get_vfield_mut_(
&mut self,
vname: $crate::TStr<__V>,
fname: __F,
) -> Option<&mut __Ty>{
let $this=self;
let field:&mut $delegating_to_type=$unsafe_get_field_mut_closure;
<$delegating_to_type as
$crate::GetVariantFieldMut<$crate::TStr<__V>,__F>
>::get_vfield_mut_(field,vname,fname)
}
$($raw_enum_ptr_fn)*
#[inline(always)]
fn get_vfield_raw_mut_unchecked_fn(
&self
)->$crate::pmr::GetFieldRawMutFn<__F,__Ty>{
<Self as
$crate::GetVariantFieldMut<$crate::TStr<__V>,__F>
>::get_vfield_raw_mut_unchecked
}
#[inline(always)]
fn get_vfield_raw_mut_fn(
&self
)->$crate::pmr::GetVFieldRawMutFn<
$crate::TStr<__V>,
__F,
__Ty
>
{
<Self as
$crate::GetVariantFieldMut<$crate::TStr<__V>,__F>
>::get_vfield_raw_mut_
}
}
$($raw_ptr_impl)*
};
(inner;
impl [$($impl_params:tt)*] $self:ty
where [$($where_clause_a:tt)*]
$(where [$($where_clause_b:tt)*])?
FromStructural {
converted_from=$converted_from:ty;
$(converted_from=$converted_from_b:ty;)?
constructor = $constructor:expr;
}
)=>{
impl<$($impl_params)* __From> $crate::pmr::FromStructural<__From> for $self
where
$($where_clause_a)*
$($($where_clause_b)*)?
$converted_from: $crate::pmr::FromStructural<__From>,
{
#[inline]
fn from_structural(from: __From) -> Self {
let delegating_to=
<$converted_from as
$crate::pmr::FromStructural<__From>
>::from_structural(from);
$constructor(delegating_to)
}
}
impl<$($impl_params)* __From,__Err> $crate::pmr::TryFromStructural<__From> for $self
where
$($where_clause_a)*
$($($where_clause_b)*)?
$converted_from: $crate::pmr::TryFromStructural<__From, Error=__Err>,
{
type Error=__Err;
#[inline]
fn try_from_structural(
from: __From,
) -> Result<Self, $crate::pmr::TryFromError<__From,__Err>> {
let res=
<$converted_from as
$crate::pmr::TryFromStructural<__From>
>::try_from_structural(from);
match res {
Ok(x) => Ok($constructor(x)),
Err(e) => Err(e),
}
}
}
};
(inner;
impl [$($impl_params:tt)*] $self:ty
where [$($where_clause:tt)*]
where [$($into_where_clause:tt)*]
self_ident=$this:ident;
delegating_to_type=$delegating_to_type:ty;
IntoField $into_field_closure:block
move_out_field $move_out_field_closure:block
)=>{
unsafe impl<$($impl_params)* __V,__F,__Ty>
$crate::pmr::IntoVariantField<$crate::TStr<__V>,__F>
for $self
where
$delegating_to_type:
$crate::pmr::IntoVariantField<$crate::TStr<__V>,__F,Ty=__Ty>,
$($into_where_clause)*
$($where_clause)*
{
#[inline(always)]
fn into_vfield_(self,vname:$crate::TStr<__V>,fname: __F)->Option<__Ty>{
let $this=self;
let field:$delegating_to_type=$into_field_closure;
$crate::IntoVariantField::<$crate::TStr<__V>, __F>::into_vfield_(
field,
vname,
fname,
)
}
#[inline(always)]
unsafe fn move_out_vfield_(
&mut self,
vname:$crate::TStr<__V>,
fname:__F,
moved: &mut $crate::pmr::MovedOutFields,
)->Option<__Ty>{
let $this=self;
let field:&mut $delegating_to_type=$move_out_field_closure;
$crate::IntoVariantField::<$crate::TStr<__V>,__F>::move_out_vfield_(
field,
vname,
fname,
moved,
)
}
}
unsafe impl<$($impl_params)* __F,__Ty>
$crate::IntoField< __F>
for $self
where
$delegating_to_type:
$crate::IntoField<__F,Ty=__Ty>,
$($into_where_clause)*
$($where_clause)*
{
#[inline(always)]
fn into_field_(self,fname: __F)->__Ty{
let $this=self;
let field:$delegating_to_type=$into_field_closure;
$crate::IntoField::<__F>::into_field_(field, fname)
}
#[inline(always)]
unsafe fn move_out_field_(
&mut self,
fname:__F,
moved: &mut $crate::pmr::MovedOutFields,
)->__Ty{
let $this=self;
let field:&mut $delegating_to_type=$move_out_field_closure;
$crate::IntoField::<__F>::move_out_field_(
field,
fname,
moved,
)
}
}
};
(@drop_fields_impls
impl [$($impl_params:tt)*] $self:ty
where [$($where_clause:tt)*]
where [$($into_where_clause:tt)*]
self_ident=$this:ident;
delegating_to_type=$delegating_to_type:ty;
IntoField $into_field_closure:block
DropFields = manual
)=>{
};
(@drop_fields_impls
impl [$($impl_params:tt)*] $self:ty
where [$($where_clause:tt)*]
where [$($into_where_clause:tt)*]
self_ident=$this:ident;
delegating_to_type=$delegating_to_type:ty;
IntoField $into_field_closure:block
move_out_field $move_out_field_closure:block
DropFields = {
dropped_fields[$($field:tt)*]
$(pre_move = $pre_move:expr;)?
$(pre_post_drop_fields=$pp_drop_fields:ident;)?
$(drop_delegated_to_variable=$drop_delegated:ident;)?
}
)=>{
unsafe impl<$($impl_params)*> $crate::pmr::DropFields for $self
where
$delegating_to_type: $crate::pmr::DropFields,
$($into_where_clause)*
$($where_clause)*
{
#[inline(always)]
fn pre_move(&mut self){
#[allow(unused_variables,unused_mut)]
let mut guard=$crate::pmr::RunOnDrop::new(
self,
#[inline(always)]
|$this|{
let field:&mut $delegating_to_type=$move_out_field_closure;
$crate::pmr::DropFields::pre_move(field);
}
);
$(
let func=$pre_move;
func(guard.reborrow_mut());
)?
}
#[allow(unused_variables)]
unsafe fn drop_fields(&mut self, moved: $crate::pmr::MovedOutFields) {
let $this=self;
$crate::delegate_to_into_helper!{
post_drop=$($pp_drop_fields)?,
self_ident=$this,
}
let mut $this=$crate::pmr::RunOnDrop::new(
$this,
#[inline(always)]
|$this|{
$crate::delegate_to_into_helper!{
drop_delegated_to=$($drop_delegated)?,
self_ident=$this,
delegating_to_type=$delegating_to_type,
delegating_to=$move_out_field_closure,
moved_fields_variable=moved,
}
$crate::reverse_code!{
$((
$crate::delegate_to_into_helper!{
drop_field($field),
self_ident=$this,
}
))*
}
}
);
let $this=$this.reborrow_mut();
$crate::delegate_to_into_helper!{
pre_drop=$($pp_drop_fields)?,
self_ident=$this,
}
}
}
};
( $($stuff:tt)* )=>{
compile_error!{concat!(
"Unrecognized `unsafe_delegate_structural_with_inner` arguments:",
$(stringify!($stuff),)*
)}
};
}
#[macro_export]
#[doc(hidden)]
macro_rules! delegate_to_into_helper {
(
drop_field(($($nested:tt)*)),
self_ident=$this:ident,
)=>{
let _a=$crate::pmr::RunDrop::new(&mut $this.$($nested)*);
};
(
drop_field(,),
self_ident=$this:ident,
)=>{};
(
drop_field($field:tt),
self_ident=$this:ident,
)=>{
let _a=$crate::pmr::RunDrop::new(&mut $this.$field);
};
(
$(pre_drop)? $(post_drop)?=$(false)?,
self_ident=$this:ident,
) => ();
(
pre_drop=true,
self_ident=$this:ident,
) => (
$crate::pmr::PrePostDropFields::pre_drop($this);
);
(
post_drop=true,
self_ident=$this:ident,
) => (
let mut $this = $crate::pmr::RunPostDrop::new($this);
let $this=$this.get_mut();
);
(
drop_delegated_to=false,
self_ident=$this:ident,
delegating_to_type=$delegating_to_type:ty,
delegating_to=$into_field_closure:block,
moved_fields_variable=$moved_fields_var:ident,
) => ();
(
drop_delegated_to=$(true)?,
self_ident=$this:ident,
delegating_to_type=$delegating_to_type:ty,
delegating_to=$into_field_closure:block,
moved_fields_variable=$moved_fields_var:ident,
) => (
let delegated_to:&mut $delegating_to_type = $into_field_closure;
let _a=$crate::pmr::RunDropFields::new(delegated_to,$moved_fields_var);
);
}