#[non_exhaustive]pub struct ProtoMetadata { /* private fields */ }Expand description
All RPC metadata extracted from proto descriptors.
Populated once via discover(), then consumed by
PatchConfig. Access extracted data through the
public accessor methods below.
Implementations§
Source§impl ProtoMetadata
impl ProtoMetadata
Sourcepub fn streaming_ops(&self) -> &[StreamingOp]
pub fn streaming_ops(&self) -> &[StreamingOp]
Server-streaming RPCs with HTTP annotations.
Sourcepub fn operation_ids(&self) -> &[OperationEntry]
pub fn operation_ids(&self) -> &[OperationEntry]
All RPC operation IDs extracted from the descriptor set.
Sourcepub fn field_constraints(&self) -> &[SchemaConstraints]
pub fn field_constraints(&self) -> &[SchemaConstraints]
Validation constraints from validate.rules field options.
Sourcepub fn enum_rewrites(&self) -> &[EnumRewrite]
pub fn enum_rewrites(&self) -> &[EnumRewrite]
Enum value rewrites for prefix-stripped enums.
Sourcepub fn redirect_paths(&self) -> &[String]
pub fn redirect_paths(&self) -> &[String]
HTTP paths for redirect endpoints.
Sourcepub fn uuid_schema(&self) -> Option<&str>
pub fn uuid_schema(&self) -> Option<&str>
gnostic schema name for the auto-detected UUID wrapper type.
Sourcepub fn path_param_constraints(&self) -> &[PathParamInfo]
pub fn path_param_constraints(&self) -> &[PathParamInfo]
Path parameter constraints, keyed by HTTP path template.
Sourcepub fn enum_value_map(&self) -> &HashMap<String, String>
pub fn enum_value_map(&self) -> &HashMap<String, String>
Raw → stripped enum value mapping for all prefix-stripped enums.
Source§impl ProtoMetadata
Test-support utilities for constructing ProtoMetadata fixtures.
impl ProtoMetadata
Test-support utilities for constructing ProtoMetadata fixtures.
These setters bypass the normal discover() path, allowing tests to
populate individual fields without a real proto descriptor. Only available
when the test-support feature is enabled.
Sourcepub fn set_streaming_ops(&mut self, ops: Vec<StreamingOp>)
pub fn set_streaming_ops(&mut self, ops: Vec<StreamingOp>)
Set streaming ops (test helper).
Sourcepub fn set_operation_ids(&mut self, ids: Vec<OperationEntry>)
pub fn set_operation_ids(&mut self, ids: Vec<OperationEntry>)
Set operation IDs (test helper).
Sourcepub fn set_field_constraints(&mut self, constraints: Vec<SchemaConstraints>)
pub fn set_field_constraints(&mut self, constraints: Vec<SchemaConstraints>)
Set field constraints (test helper).
Sourcepub fn set_enum_rewrites(&mut self, rewrites: Vec<EnumRewrite>)
pub fn set_enum_rewrites(&mut self, rewrites: Vec<EnumRewrite>)
Set enum rewrites (test helper).
Sourcepub fn set_enum_value_map(&mut self, map: HashMap<String, String>)
pub fn set_enum_value_map(&mut self, map: HashMap<String, String>)
Set enum value map (test helper).