pub struct DynamicTypeLoader { /* private fields */ }Expand description
Type loader that can load types dynamically using data type definitions loaded at runtime.
Implementations§
Source§impl DynamicTypeLoader
impl DynamicTypeLoader
Sourcepub fn new(type_tree: Arc<DataTypeTree>) -> Self
pub fn new(type_tree: Arc<DataTypeTree>) -> Self
Create a new type loader that loads types from the given type tree.
Trait Implementations§
Source§impl TypeLoader for DynamicTypeLoader
impl TypeLoader for DynamicTypeLoader
Source§fn load_from_binary(
&self,
node_id: &NodeId,
stream: &mut dyn Read,
ctx: &Context<'_>,
_length: Option<usize>,
) -> Option<EncodingResult<Box<dyn DynEncodable>>>
fn load_from_binary( &self, node_id: &NodeId, stream: &mut dyn Read, ctx: &Context<'_>, _length: Option<usize>, ) -> Option<EncodingResult<Box<dyn DynEncodable>>>
Load the type given by
node_id from Binary by trying each
registered type loader until one returns Some.Source§fn priority(&self) -> TypeLoaderPriority
fn priority(&self) -> TypeLoaderPriority
Get the priority of this type loader.
Source§fn load_from_xml(
&self,
node_id: &NodeId,
stream: &mut XmlStreamReader<&mut dyn Read>,
ctx: &Context<'_>,
_name: &str,
) -> Option<EncodingResult<Box<dyn DynEncodable>>>
fn load_from_xml( &self, node_id: &NodeId, stream: &mut XmlStreamReader<&mut dyn Read>, ctx: &Context<'_>, _name: &str, ) -> Option<EncodingResult<Box<dyn DynEncodable>>>
Load the type given by
node_id from XML by trying each
registered type loader until one returns Some.Source§fn load_from_json(
&self,
node_id: &NodeId,
stream: &mut JsonStreamReader<&mut dyn Read>,
ctx: &Context<'_>,
) -> Option<EncodingResult<Box<dyn DynEncodable>>>
fn load_from_json( &self, node_id: &NodeId, stream: &mut JsonStreamReader<&mut dyn Read>, ctx: &Context<'_>, ) -> Option<EncodingResult<Box<dyn DynEncodable>>>
Load the type given by
node_id from JSON by trying each
registered type loader until one returns Some.Auto Trait Implementations§
impl Freeze for DynamicTypeLoader
impl RefUnwindSafe for DynamicTypeLoader
impl Send for DynamicTypeLoader
impl Sync for DynamicTypeLoader
impl Unpin for DynamicTypeLoader
impl UnwindSafe for DynamicTypeLoader
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