mod private
{
#[ macro_export ]
macro_rules! _field_with_key
{
(
$path : expr,
$key : ident,
$how : ty,
$fallback1 : ty,
$fallback2 : ty
$(,)?
)
=>
{{
(
::core::stringify!( $key ),
Option::Some
(
$crate::to_string_with_fallback!( $how, $fallback1, $fallback2, $path )
),
)
}};
}
#[ macro_export ]
macro_rules! _field
{
( ( & $pre:ident.$( $key:tt )+ ), $how : ty, $fallback1 : ty, $fallback2 : ty $(,)? ) =>
{{
$crate::_field!( # ( & $pre . ) ( $( $key )+ ) ( $how, $fallback1, $fallback2 ) )
}};
( ( $pre:ident.$( $key:tt )+ ), $how : ty, $fallback1 : ty, $fallback2 : ty $(,)? ) =>
{{
$crate::_field!( # ( $pre . ) ( $( $key )+ ) ( $how, $fallback1, $fallback2 ) )
}};
( ( & $key:ident ), $how : ty, $fallback1 : ty, $fallback2 : ty $(,)? ) =>
{{
$crate::_field!( # () ( & $key ) ( $how, $fallback1, $fallback2 ) )
}};
( ( $key:ident ), $how : ty, $fallback1 : ty, $fallback2 : ty $(,)? ) =>
{{
$crate::_field!( # () ( $key ) ( $how, $fallback1, $fallback2 ) )
}};
(
#
( $( $prefix:tt )* )
( $prekey:ident.$( $field:tt )+ )
( $how : ty, $fallback1 : ty, $fallback2 : ty )
)
=>
{{
$crate::_field!( # ( $( $prefix )* $prekey . ) ( $( $field )+ ) ( $how, $fallback1, $fallback2 ) )
}};
(
#
( $( $prefix:tt )* )
( $prekey:tt.$( $field:tt )+ )
( $how : ty, $fallback1 : ty, $fallback2 : ty )
)
=>
{{
$crate::_field!( # ( $( $prefix )* $prekey . ) ( $( $field )+ ) ( $how, $fallback1, $fallback2 ) )
}};
(
#
( $( $prefix:tt )* )
( $key:ident )
( $how : ty, $fallback1 : ty, $fallback2 : ty )
)
=>
{{
$crate::_field!( # # ( $( $prefix )* ) ( $key ) ( $how, $fallback1, $fallback2 ) )
}};
(
# #
( $( $prefix:tt )* )
( $key:ident )
( $how : ty, $fallback1 : ty, $fallback2 : ty )
)
=>
{{
$crate::_field_with_key!( $( $prefix )* $key, $key, $how, $fallback1, $fallback2 )
}};
}
pub mod ref_or_display_or_debug_multiline
{
#[ macro_export ]
macro_rules! ref_or_display_or_debug_multiline_field_with_key
{
(
$key : ident,
$src : expr
$(,)?
)
=>
{{
$crate::_field_with_key!( $src, $key, $crate::WithRef, $crate::WithDisplay, $crate::WithDebugMultiline )
}};
}
#[ macro_export ]
macro_rules! ref_or_display_or_debug_multiline_field
{
( $( $t:tt )+ )
=>
{{
$crate::_field!( ( $( $t )+ ), $crate::WithRef, $crate::WithDisplay, $crate::WithDebugMultiline )
}}
}
pub use ref_or_display_or_debug_multiline_field_with_key as field_with_key;
pub use ref_or_display_or_debug_multiline_field as field;
}
pub mod ref_or_display_or_debug
{
#[ macro_export ]
macro_rules! ref_or_display_or_debug_field_with_key
{
(
$key : ident,
$src : expr
$(,)?
)
=>
{{
$crate::_field_with_key!( $src, $key, $crate::WithRef, $crate::WithDisplay, $crate::WithDebug )
}};
}
#[ macro_export ]
macro_rules! ref_or_display_or_debug_field
{
( $( $t:tt )+ )
=>
{{
$crate::_field!( ( $( $t )+ ), $crate::WithRef, $crate::WithDisplay, $crate::WithDebug )
}}
}
pub use ref_or_display_or_debug_field_with_key as field_with_key;
pub use ref_or_display_or_debug_field as field;
}
pub mod ref_or_debug
{
#[ macro_export ]
macro_rules! ref_or_debug_field_with_key
{
(
$key : ident,
$src : expr
$(,)?
)
=>
{{
$crate::_field_with_key!( $src, $key, $crate::WithRef, $crate::WithDebug, $crate::WithDebug )
}};
}
#[ macro_export ]
macro_rules! ref_or_debug_field
{
( $( $t:tt )+ )
=>
{{
$crate::_field!( ( $( $t )+ ), $crate::WithRef, $crate::WithDebug, $crate::WithDebug )
}}
}
pub use ref_or_debug_field_with_key as field_with_key;
pub use ref_or_debug_field as field;
}
}
pub mod as_table;
pub mod filter;
pub mod md_math;
pub mod output_format;
pub mod print;
pub mod string;
pub mod table;
pub mod to_string;
pub mod to_string_with_fallback;
pub mod text_wrap;
#[ doc( hidden ) ]
#[ cfg( debug_assertions ) ]
pub mod test_object_without_impl;
#[ doc( inline ) ]
#[ allow( unused_imports ) ]
pub use own::*;
#[ allow( unused_imports ) ]
pub mod own
{
use super::*;
#[ doc( inline ) ]
pub use super::
{
as_table::orphan::*,
filter::orphan::*,
md_math::orphan::*,
output_format::orphan::*,
print::orphan::*,
string::orphan::*,
table::orphan::*,
to_string::orphan::*,
to_string_with_fallback::orphan::*,
text_wrap::orphan::*,
};
}
#[ allow( unused_imports ) ]
pub mod orphan
{
use super::*;
#[ doc( inline ) ]
pub use exposed::*;
#[ doc( inline ) ]
pub use private::
{
ref_or_display_or_debug,
ref_or_display_or_debug_multiline,
ref_or_debug,
};
#[ doc( hidden ) ]
#[ cfg( debug_assertions ) ]
pub use test_object_without_impl::
{
TestObjectWithoutImpl,
test_objects_gen,
};
}
#[ allow( unused_imports ) ]
pub mod exposed
{
use super::*;
#[ doc( inline ) ]
pub use reflect_tools::OptionalCow;
#[ doc( inline ) ]
pub use
{
as_table::exposed::*,
filter::exposed::*,
md_math::exposed::*,
output_format::exposed::*,
print::exposed::*,
string::exposed::*,
table::exposed::*,
to_string::exposed::*,
to_string_with_fallback::exposed::*,
text_wrap::exposed::*,
};
}
#[ allow( unused_imports ) ]
pub mod prelude
{
use super::*;
#[ doc( inline ) ]
pub use
{
as_table::prelude::*,
filter::prelude::*,
md_math::prelude::*,
output_format::prelude::*,
print::prelude::*,
string::prelude::*,
table::prelude::*,
to_string::prelude::*,
to_string_with_fallback::prelude::*,
text_wrap::prelude::*,
};
}