pub struct ServerSection {
pub framework: String,
pub operations: Vec<String>,
pub prune_models: bool,
}Expand description
Opt-in server codegen scope.
operations accepts three selector forms, parsed by
crate::server::Selector::parse:
operationId(recommended)METHOD /pathtag:<name>
Fields§
§framework: StringTarget framework. Only "axum" is currently supported.
operations: Vec<String>Selectors picking which operations get server scaffolding. Empty ⇒ section is a no-op.
prune_models: boolEmit only the model types reachable (transitively) from all selected output scopes. When client and server generation coexist, pruning keeps the union of both operation sets plus configured streaming event roots.
Implementations§
Source§impl ServerSection
impl ServerSection
Sourcepub fn parsed_selectors(&self) -> Result<Vec<Selector>, SelectorParseError>
pub fn parsed_selectors(&self) -> Result<Vec<Selector>, SelectorParseError>
Parse each operations entry into a crate::server::Selector.
Returns the first parse error encountered.
Trait Implementations§
Source§impl Clone for ServerSection
impl Clone for ServerSection
Source§fn clone(&self) -> ServerSection
fn clone(&self) -> ServerSection
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 moreSource§impl Debug for ServerSection
impl Debug for ServerSection
Source§impl<'de> Deserialize<'de> for ServerSection
impl<'de> Deserialize<'de> for ServerSection
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 ServerSection
impl RefUnwindSafe for ServerSection
impl Send for ServerSection
impl Sync for ServerSection
impl Unpin for ServerSection
impl UnsafeUnpin for ServerSection
impl UnwindSafe for ServerSection
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