pub struct ContextOwned { /* private fields */ }Expand description
Owned variant of Context, this is stored by clients and servers, which call the ContextOwned::context method to produce a Context for decoding/encoding.
Implementations§
Source§impl ContextOwned
impl ContextOwned
Sourcepub fn new(
namespaces: NamespaceMap,
loaders: TypeLoaderCollection,
options: DecodingOptions,
) -> Self
pub fn new( namespaces: NamespaceMap, loaders: TypeLoaderCollection, options: DecodingOptions, ) -> Self
Create a new context.
Sourcepub fn new_default(namespaces: NamespaceMap, options: DecodingOptions) -> Self
pub fn new_default(namespaces: NamespaceMap, options: DecodingOptions) -> Self
Create a new context, including the core type loader.
Sourcepub fn namespaces(&self) -> &NamespaceMap
pub fn namespaces(&self) -> &NamespaceMap
Get the namespace map.
Sourcepub fn namespaces_mut(&mut self) -> &mut NamespaceMap
pub fn namespaces_mut(&mut self) -> &mut NamespaceMap
Get the namespace map mutably.
Sourcepub fn options(&self) -> &DecodingOptions
pub fn options(&self) -> &DecodingOptions
Get the decoding options.
Sourcepub fn options_mut(&mut self) -> &mut DecodingOptions
pub fn options_mut(&mut self) -> &mut DecodingOptions
Get the decoding options mutably.
Sourcepub fn loaders_mut(&mut self) -> &mut TypeLoaderCollection
pub fn loaders_mut(&mut self) -> &mut TypeLoaderCollection
Get a mutable reference to the type loaders.
Trait Implementations§
Source§impl Debug for ContextOwned
impl Debug for ContextOwned
Auto Trait Implementations§
impl !Freeze for ContextOwned
impl !RefUnwindSafe for ContextOwned
impl Send for ContextOwned
impl Sync for ContextOwned
impl Unpin for ContextOwned
impl !UnwindSafe for ContextOwned
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