pub struct ChioExtensions {
pub sensitivity: Option<Sensitivity>,
pub side_effects: Option<bool>,
pub approval_required: Option<bool>,
pub budget_limit: Option<u64>,
pub publish: Option<bool>,
}Expand description
Parsed x-chio-* extension fields from an OpenAPI operation.
Fields§
§sensitivity: Option<Sensitivity>x-chio-sensitivity – data sensitivity classification.
side_effects: Option<bool>x-chio-side-effects – explicit override for whether the operation
has side effects (overrides the HTTP method default).
approval_required: Option<bool>x-chio-approval-required – whether human approval is needed.
budget_limit: Option<u64>x-chio-budget-limit – maximum cost in minor currency units that a
single invocation may charge.
publish: Option<bool>x-chio-publish – whether to include this operation in the generated
manifest. Defaults to true if absent.
Implementations§
Source§impl ChioExtensions
impl ChioExtensions
Sourcepub fn from_operation(obj: &Value) -> Self
pub fn from_operation(obj: &Value) -> Self
Extract Chio extension fields from a raw JSON object (the operation object as parsed from the OpenAPI spec).
Sourcepub fn should_publish(&self) -> bool
pub fn should_publish(&self) -> bool
Whether this operation should be included in the generated manifest.
Returns true unless x-chio-publish is explicitly set to false.
Trait Implementations§
Source§impl Clone for ChioExtensions
impl Clone for ChioExtensions
Source§fn clone(&self) -> ChioExtensions
fn clone(&self) -> ChioExtensions
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 ChioExtensions
impl Debug for ChioExtensions
Source§impl Default for ChioExtensions
impl Default for ChioExtensions
Source§fn default() -> ChioExtensions
fn default() -> ChioExtensions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ChioExtensions
impl RefUnwindSafe for ChioExtensions
impl Send for ChioExtensions
impl Sync for ChioExtensions
impl Unpin for ChioExtensions
impl UnsafeUnpin for ChioExtensions
impl UnwindSafe for ChioExtensions
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