pub struct DynAnyFactory;Expand description
DynamicAny::DynAnyFactory, the initial reference DynAnyFactory.
It keeps no state.
Implementations§
Source§impl DynAnyFactory
impl DynAnyFactory
Sourcepub fn create_dyn_any(&self, value: &Any) -> Result<DynAny, DynAnyError>
pub fn create_dyn_any(&self, value: &Any) -> Result<DynAny, DynAnyError>
A DynAny with the type and the value of value. A valuetype
instance of a type derived from the declared one is truncated to
the declared type.
Sourcepub fn create_dyn_any_without_truncation(
&self,
value: &Any,
) -> Result<DynAny, DynAnyError>
pub fn create_dyn_any_without_truncation( &self, value: &Any, ) -> Result<DynAny, DynAnyError>
create_dyn_any, but
MustTruncate where a valuetype would be truncated.
Sourcepub fn create_dyn_any_from_type_code(
&self,
tc: &TypeCode,
) -> Result<DynAny, DynAnyError>
pub fn create_dyn_any_from_type_code( &self, tc: &TypeCode, ) -> Result<DynAny, DynAnyError>
A DynAny of type tc with the default value: zero, false, empty
strings and sequences, the first enumerator, a union with the
first label value of its TypeCode, nil references, null valuetypes, an empty any and a
null TypeCode, and structs and arrays of those.
InconsistentTypeCode for Principal, native, abstract and
local interfaces, an enum without enumerators and
an unresolved recursive TypeCode.
Sourcepub fn create_multiple_dyn_anys(
&self,
values: &[Any],
allow_truncate: bool,
) -> Result<Vec<DynAny>, DynAnyError>
pub fn create_multiple_dyn_anys( &self, values: &[Any], allow_truncate: bool, ) -> Result<Vec<DynAny>, DynAnyError>
DynAnys of the values, each as
create_dyn_any or, without
allow_truncate, as
create_dyn_any_without_truncation.
Sourcepub fn create_multiple_anys(
&self,
values: &[DynAny],
) -> Result<Vec<Any>, DynAnyError>
pub fn create_multiple_anys( &self, values: &[DynAny], ) -> Result<Vec<Any>, DynAnyError>
The values of the DynAnys.