1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*!
Types and traits related to type erasure.
*/

use std::{
    cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd},
    fmt::{self, Debug, Display},
    hash::{Hash, Hasher},
    mem,
    ops::Deref,
};

use core_extensions::type_level_bool::{Boolean, False, True};

use serde::{Serialize, Serializer};

use crate::{
    traits::{IntoReprC, IntoReprRust},
    ZeroSized, 
    std_types::{RBoxError, RCmpOrdering, RCow, RErr, ROk, ROption,RResult, RSlice, RString,RStr},
};

pub(crate)mod c_functions;
pub mod trait_objects;
pub mod type_info;
pub mod virtual_wrapper;
pub(crate) mod vtable;
pub mod traits;

pub use self::{
    virtual_wrapper::{VirtualWrapper, VirtualWrapperTrait},
    vtable::{ GetVtable },
    traits::{ImplType, InterfaceType, SerializeImplType, DeserializeInterfaceType},
    type_info::TypeInfo,
};

use self::{
    vtable::{GetImplFlags},
};

/// The formatting mode for all std::fmt formatters.
///
/// For Display,"{}" is Default_ "{:#}" is Alternate
///
/// For Debug,"{:?}" is Default_ "{:#?}" is Alternate
///
/// etc.
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, StableAbi)]
#[sabi(inside_abi_stable_crate)]
pub enum FormattingMode {
    Default_,
    Alternate,
}

//////////////////////////////////////////////////////////