Enum uniffi_bindgen::backend::Type
pub enum Type {
Show 24 variants
UInt8,
Int8,
UInt16,
Int16,
UInt32,
Int32,
UInt64,
Int64,
Float32,
Float64,
Boolean,
String,
Bytes,
Timestamp,
Duration,
Object {
module_path: String,
name: String,
imp: ObjectImpl,
},
Record {
module_path: String,
name: String,
},
Enum {
module_path: String,
name: String,
},
CallbackInterface {
module_path: String,
name: String,
},
Optional {
inner_type: Box<Type, Global>,
},
Sequence {
inner_type: Box<Type, Global>,
},
Map {
key_type: Box<Type, Global>,
value_type: Box<Type, Global>,
},
External {
module_path: String,
name: String,
namespace: String,
kind: ExternalKind,
tagged: bool,
},
Custom {
module_path: String,
name: String,
builtin: Box<Type, Global>,
},
}
Expand description
Represents all the different high-level types that can be used in a component interface. At this level we identify user-defined types by name, without knowing any details of their internal structure apart from what type of thing they are (record, enum, etc).
Variants§
UInt8
Int8
UInt16
Int16
UInt32
Int32
UInt64
Int64
Float32
Float64
Boolean
String
Bytes
Timestamp
Duration
Object
Record
Enum
CallbackInterface
Optional
Sequence
Map
External
Custom
Implementations§
Trait Implementations§
source§impl From<&Type> for FfiType
impl From<&Type> for FfiType
When passing data across the FFI, each Type
value will be lowered into a corresponding
FfiType
value. This conversion tells you which one.
Note that the conversion is one-way - given an FfiType, it is not in general possible to tell what the corresponding Type is that it’s being used to represent.
§impl Ord for Type
impl Ord for Type
§impl PartialOrd<Type> for Type
impl PartialOrd<Type> for Type
§fn partial_cmp(&self, other: &Type) -> Option<Ordering>
fn partial_cmp(&self, other: &Type) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Type
impl StructuralEq for Type
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
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