pub struct FallbackTypeLoader;Expand description
Type loader that accepts any type, and simply returns one of ByteStringBody, JsonBody, or XmlBody
Trait Implementations§
Source§impl TypeLoader for FallbackTypeLoader
impl TypeLoader for FallbackTypeLoader
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.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.
Auto Trait Implementations§
impl Freeze for FallbackTypeLoader
impl RefUnwindSafe for FallbackTypeLoader
impl Send for FallbackTypeLoader
impl Sync for FallbackTypeLoader
impl Unpin for FallbackTypeLoader
impl UnwindSafe for FallbackTypeLoader
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