pub struct RuntimeBridge { /* private fields */ }Expand description
Implementations§
Source§impl RuntimeBridge
impl RuntimeBridge
Sourcepub fn from_fds(fds: &[u8]) -> Self
pub fn from_fds(fds: &[u8]) -> Self
Build a bridge from raw FileDescriptorSet bytes.
The bytes are edition-normalized (Edition 2023 → proto3, matching the runtime validator’s decode pool) before the pool and validator are constructed — mirroring the conformance executor’s suite setup. The same normalized bytes back both the decode pool and the validator’s extension resolution.
§Panics
Panics if the descriptor set cannot be decoded. The bytes are embedded
at build time by prost-protovalidate-build, so a failure indicates a
generator bug rather than runtime input.
Sourcepub fn validate_wire(
&self,
full_name: &str,
wire_bytes: &[u8],
) -> Result<(), Error>
pub fn validate_wire( &self, full_name: &str, wire_bytes: &[u8], ) -> Result<(), Error>
Validate a wire-encoded message of type full_name against its
buf.validate rules through the runtime Validator.
wire_bytes is the protobuf binary encoding of the message (e.g. from
buffa::Message::encode_to_vec). The full Error is returned so
callers that must distinguish Compilation/Runtime outcomes
(conformance, diagnostics) can; the generated Validate impls collapse
it to ValidationError via error_to_validation_error.
§Errors
Returns Error::Validation for rule violations, or
Error::Compilation / Error::Runtime when rule evaluation fails.
Returns Error::Runtime if full_name is absent from the pool or the
bytes fail to decode.
Auto Trait Implementations§
impl !Freeze for RuntimeBridge
impl !RefUnwindSafe for RuntimeBridge
impl !UnwindSafe for RuntimeBridge
impl Send for RuntimeBridge
impl Sync for RuntimeBridge
impl Unpin for RuntimeBridge
impl UnsafeUnpin for RuntimeBridge
Blanket Implementations§
Source§impl<T> AnyExt for T
impl<T> AnyExt for T
Source§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
T behind referenceSource§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
T behind mutable referenceSource§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
T behind Rc pointerSource§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
T behind Arc pointerSource§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
Source§impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
fn coerce_rc_to(self: Rc<X>) -> Rc<T>
fn coerce_box_to(self: Box<X>) -> Box<T>
fn coerce_ref_to(&self) -> &T
fn coerce_mut_to(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request