pub struct Decimal {
pub unscaled: BigInt,
pub scale: i32,
}Fields§
§unscaled: BigInt§scale: i32Implementations§
Trait Implementations§
Source§impl ForyDefault for Decimal
impl ForyDefault for Decimal
Source§fn fory_default() -> Decimal
fn fory_default() -> Decimal
Creates a default value for this type. Read more
Source§impl Serializer for Decimal
impl Serializer for Decimal
Source§fn fory_write_data(&self, context: &mut WriteContext<'_>) -> Result<(), Error>
fn fory_write_data(&self, context: &mut WriteContext<'_>) -> Result<(), Error>
[USER IMPLEMENTATION REQUIRED] Serialize the type’s data to the buffer. Read more
Source§fn fory_read_data(context: &mut ReadContext<'_>) -> Result<Decimal, Error>
fn fory_read_data(context: &mut ReadContext<'_>) -> Result<Decimal, Error>
[USER IMPLEMENTATION REQUIRED] Deserialize the type’s data from the buffer. Read more
Source§fn fory_get_type_id(_: &TypeResolver) -> Result<TypeId, Error>
fn fory_get_type_id(_: &TypeResolver) -> Result<TypeId, Error>
Get the registered type ID from the type resolver. Read more
Source§fn fory_type_id_dyn(&self, _: &TypeResolver) -> Result<TypeId, Error>
fn fory_type_id_dyn(&self, _: &TypeResolver) -> Result<TypeId, Error>
[USER IMPLEMENTATION REQUIRED] Get the runtime type ID for this instance. Read more
Source§fn fory_static_type_id() -> TypeId
fn fory_static_type_id() -> TypeId
Get the static Fory type ID for this type. Read more
Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
[USER IMPLEMENTATION REQUIRED] Downcast to
&dyn Any for dynamic type checking. Read moreSource§fn fory_write_type_info(context: &mut WriteContext<'_>) -> Result<(), Error>
fn fory_write_type_info(context: &mut WriteContext<'_>) -> Result<(), Error>
Write type metadata to the buffer. Read more
Source§fn fory_read_type_info(context: &mut ReadContext<'_>) -> Result<(), Error>
fn fory_read_type_info(context: &mut ReadContext<'_>) -> Result<(), Error>
Read and validate type metadata from the buffer. Read more
Source§fn fory_write(
&self,
context: &mut WriteContext<'_>,
ref_mode: RefMode,
write_type_info: bool,
has_generics: bool,
) -> Result<(), Error>where
Self: Sized,
fn fory_write(
&self,
context: &mut WriteContext<'_>,
ref_mode: RefMode,
write_type_info: bool,
has_generics: bool,
) -> Result<(), Error>where
Self: Sized,
Entry point for serialization. Read more
Source§fn fory_write_data_generic(
&self,
context: &mut WriteContext<'_>,
has_generics: bool,
) -> Result<(), Error>
fn fory_write_data_generic( &self, context: &mut WriteContext<'_>, has_generics: bool, ) -> Result<(), Error>
Write data with generic type parameter support. Read more
Source§fn fory_read(
context: &mut ReadContext<'_>,
ref_mode: RefMode,
read_type_info: bool,
) -> Result<Self, Error>where
Self: Sized + ForyDefault,
fn fory_read(
context: &mut ReadContext<'_>,
ref_mode: RefMode,
read_type_info: bool,
) -> Result<Self, Error>where
Self: Sized + ForyDefault,
Entry point for deserialization. Read more
Source§fn fory_read_with_type_info(
context: &mut ReadContext<'_>,
ref_mode: RefMode,
type_info: Rc<TypeInfo>,
) -> Result<Self, Error>where
Self: Sized + ForyDefault,
fn fory_read_with_type_info(
context: &mut ReadContext<'_>,
ref_mode: RefMode,
type_info: Rc<TypeInfo>,
) -> Result<Self, Error>where
Self: Sized + ForyDefault,
Deserialize with pre-read type information. Read more
Source§fn fory_is_none(&self) -> bool
fn fory_is_none(&self) -> bool
Check if this instance represents a
None value. Read moreSource§fn fory_is_polymorphic() -> boolwhere
Self: Sized,
fn fory_is_polymorphic() -> boolwhere
Self: Sized,
Check if this type supports polymorphic serialization. Read more
Check if this type is a shared reference (Rc/Arc). Read more
fn fory_is_wrapper_type() -> boolwhere
Self: Sized,
fn fory_get_type_info(
type_resolver: &TypeResolver,
) -> Result<Rc<TypeInfo>, Error>where
Self: Sized,
Source§fn fory_concrete_type_id(&self) -> TypeId
fn fory_concrete_type_id(&self) -> TypeId
Get Rust’s
std::any::TypeId for this instance. Read moreimpl Eq for Decimal
impl StructuralPartialEq for Decimal
Auto Trait Implementations§
impl Freeze for Decimal
impl RefUnwindSafe for Decimal
impl Send for Decimal
impl Sync for Decimal
impl Unpin for Decimal
impl UnsafeUnpin for Decimal
impl UnwindSafe for Decimal
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