pub struct ConfigResource { /* private fields */ }Expand description
Raw resource content fetched from the plain-text Spring Config endpoint.
Implementations§
Source§impl ConfigResource
impl ConfigResource
Sourcepub fn content_type(&self) -> Option<&str>
pub fn content_type(&self) -> Option<&str>
Returns the response content type, when present.
Sourcepub fn into_bytes(self) -> Vec<u8> ⓘ
pub fn into_bytes(self) -> Vec<u8> ⓘ
Consumes the resource and returns the raw bytes.
Sourcepub fn format(&self) -> DocumentFormat
pub fn format(&self) -> DocumentFormat
Guesses the document format from the resource path, content type, and payload.
Sourcepub fn parse(&self) -> Result<ConfigDocument>
pub fn parse(&self) -> Result<ConfigDocument>
Parses the resource into a ConfigDocument.
Sourcepub fn deserialize<T>(&self) -> Result<T>where
T: DeserializeOwned,
pub fn deserialize<T>(&self) -> Result<T>where
T: DeserializeOwned,
Parses and deserializes the resource into a Rust type.
Trait Implementations§
Source§impl Clone for ConfigResource
impl Clone for ConfigResource
Source§fn clone(&self) -> ConfigResource
fn clone(&self) -> ConfigResource
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConfigResource
impl Debug for ConfigResource
Source§impl PartialEq for ConfigResource
impl PartialEq for ConfigResource
impl StructuralPartialEq for ConfigResource
Auto Trait Implementations§
impl Freeze for ConfigResource
impl RefUnwindSafe for ConfigResource
impl Send for ConfigResource
impl Sync for ConfigResource
impl Unpin for ConfigResource
impl UnsafeUnpin for ConfigResource
impl UnwindSafe for ConfigResource
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