pub struct AdapterFile {
pub schema_version: u32,
pub adapters: BTreeMap<String, Adapter>,
}Expand description
A parsed adapter file. One file may define several upstreams.
Fields§
§schema_version: u32§adapters: BTreeMap<String, Adapter>Implementations§
Source§impl AdapterFile
impl AdapterFile
Sourcepub fn parse(source: &str) -> Result<Self, AdapterError>
pub fn parse(source: &str) -> Result<Self, AdapterError>
Parse and validate. Validation is not optional and there is no lenient mode: an adapter that does not fully parse is an adapter whose enforcement we cannot describe, and shipping one would mean claiming protection we cannot demonstrate.
Trait Implementations§
Source§impl Clone for AdapterFile
impl Clone for AdapterFile
Source§impl Debug for AdapterFile
impl Debug for AdapterFile
Source§impl<'de> Deserialize<'de> for AdapterFile
impl<'de> Deserialize<'de> for AdapterFile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AdapterFile
impl RefUnwindSafe for AdapterFile
impl Send for AdapterFile
impl Sync for AdapterFile
impl Unpin for AdapterFile
impl UnsafeUnpin for AdapterFile
impl UnwindSafe for AdapterFile
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