pub enum WirePolicy {
Fixed(WireFormat),
ModelAware,
}Expand description
How a provider selects its request wire format.
Variants§
Fixed(WireFormat)
Every model served by the provider uses the same wire format.
ModelAware
The provider catalog selects a wire format per model/endpoint.
Implementations§
Source§impl WirePolicy
impl WirePolicy
Sourcepub const fn fixed(self) -> Option<WireFormat>
pub const fn fixed(self) -> Option<WireFormat>
Return the fixed format, or None for model-aware providers.
Sourcepub fn resolve(self, endpoint_key: &str) -> Option<WireFormat>
pub fn resolve(self, endpoint_key: &str) -> Option<WireFormat>
Resolve a concrete format from an offering endpoint key.
Trait Implementations§
Source§impl Clone for WirePolicy
impl Clone for WirePolicy
Source§fn clone(&self) -> WirePolicy
fn clone(&self) -> WirePolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for WirePolicy
Source§impl Debug for WirePolicy
impl Debug for WirePolicy
impl Eq for WirePolicy
Source§impl PartialEq for WirePolicy
impl PartialEq for WirePolicy
impl StructuralPartialEq for WirePolicy
Auto Trait Implementations§
impl Freeze for WirePolicy
impl RefUnwindSafe for WirePolicy
impl Send for WirePolicy
impl Sync for WirePolicy
impl Unpin for WirePolicy
impl UnsafeUnpin for WirePolicy
impl UnwindSafe for WirePolicy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.