pub struct AdapterConfig {
pub version: u32,
pub selectors: Vec<ClosedSelector>,
pub payloads: Vec<PayloadSelector>,
pub borrowed: Vec<BorrowedAdapter>,
pub ports: Vec<CapabilityPort>,
}Expand description
Opt-in, descriptor-checked adapter declarations.
This metadata contains names and paths only; never put keys or application data in it. Unknown JSON members and duplicate members are rejected.
Fields§
§version: u32Manifest format. Currently must be 1.
selectors: Vec<ClosedSelector>Closed selectors with checked wire conversions.
payloads: Vec<PayloadSelector>Copy payload selectors. Payloads name a declared descriptor field.
borrowed: Vec<BorrowedAdapter>Borrowed enums; never implement a wire codec or own caller buffers.
ports: Vec<CapabilityPort>Process-local provider traits, explicitly declared by the application.
Implementations§
Source§impl AdapterConfig
impl AdapterConfig
Sourcepub fn from_json(bytes: &[u8]) -> Result<Self, AdapterError>
pub fn from_json(bytes: &[u8]) -> Result<Self, AdapterError>
Decode a bounded manifest without exposing input in diagnostics.
§Errors
Returns a fixed reason for oversized, malformed or unsupported input.
Sourcepub fn read_json(path: impl AsRef<Path>) -> Result<Self, AdapterError>
pub fn read_json(path: impl AsRef<Path>) -> Result<Self, AdapterError>
Read a manifest with the same bound as Self::from_json.
§Errors
Returns a fixed I/O, size or manifest error, without retaining paths.
Trait Implementations§
Source§impl Clone for AdapterConfig
impl Clone for AdapterConfig
Source§impl Debug for AdapterConfig
impl Debug for AdapterConfig
Source§impl<'de> Deserialize<'de> for AdapterConfig
impl<'de> Deserialize<'de> for AdapterConfig
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
Source§impl TryFrom<&NativeAdapters> for AdapterConfig
impl TryFrom<&NativeAdapters> for AdapterConfig
Source§type Error = AdapterError
type Error = AdapterError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Forget for AdapterConfig
impl Freeze for AdapterConfig
impl Move for AdapterConfig
impl RefUnwindSafe for AdapterConfig
impl Send for AdapterConfig
impl Sync for AdapterConfig
impl Unpin for AdapterConfig
impl UnsafeUnpin for AdapterConfig
impl UnwindSafe for AdapterConfig
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