pub enum M2mRequest {
GetDestinationCompliance {
source: Resource,
destination: Resource,
},
GetSourceCompliance {
authority_ip: String,
resources: HashSet<Resource>,
},
UpdateProvenance {
source_prov: HashMap<String, HashSet<Resource>>,
destination: Resource,
},
}
Expand description
Middleware-to-Middleware (M2M) request types.
These requests enable communication between distributed middleware instances to maintain consistent compliance policies and provenance records across the network. Used primarily for cross-node data flows and distributed policy enforcement.
Variants§
GetDestinationCompliance
Request compliance policies for a destination resource from its authoritative middleware.
Used when a local middleware needs to evaluate whether a data flow to a remote resource is permitted. The source middleware queries the destination middleware to obtain current policies before authorizing the operation.
Fields
GetSourceCompliance
Request compliance policies for source resources from their authoritative middleware.
Used by destination middleware to verify that incoming data flows comply with source policies and organizational requirements.
Fields
IP address of the authoritative middleware for the source resources
UpdateProvenance
Update provenance records on the destination middleware following a cross-node data flow.
Transfers lineage information from source to destination to maintain complete provenance chains across distributed systems.
Trait Implementations§
Source§impl Clone for M2mRequest
impl Clone for M2mRequest
Source§fn clone(&self) -> M2mRequest
fn clone(&self) -> M2mRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for M2mRequest
impl Debug for M2mRequest
Source§impl From<GetDestinationCompliance> for M2mRequest
Converts Protocol Buffer GetDestinationCompliance request to internal M2M request.
impl From<GetDestinationCompliance> for M2mRequest
Converts Protocol Buffer GetDestinationCompliance request to internal M2M request.
Source§fn from(req: GetDestinationCompliance) -> Self
fn from(req: GetDestinationCompliance) -> Self
Source§impl From<GetSourceCompliance> for M2mRequest
Converts Protocol Buffer GetSourceCompliance request to internal M2M request.
impl From<GetSourceCompliance> for M2mRequest
Converts Protocol Buffer GetSourceCompliance request to internal M2M request.
Source§fn from(req: GetSourceCompliance) -> Self
fn from(req: GetSourceCompliance) -> Self
Source§impl From<UpdateProvenance> for M2mRequest
Converts Protocol Buffer UpdateProvenance request to internal M2M request.
impl From<UpdateProvenance> for M2mRequest
Converts Protocol Buffer UpdateProvenance request to internal M2M request.
Source§fn from(req: UpdateProvenance) -> Self
fn from(req: UpdateProvenance) -> Self
Source§impl<S, P, C> Service<M2mRequest> for M2mApiService<S, P, C>where
S: Service<SequencerRequest, Response = SequencerResponse, Error = TraceabilityError> + Clone + Send + 'static,
S::Future: Send,
P: Service<ProvenanceRequest, Response = ProvenanceResponse, Error = TraceabilityError> + Clone + Send + NodeId + 'static,
P::Future: Send,
C: Service<ComplianceRequest, Response = ComplianceResponse, Error = TraceabilityError> + Clone + Send + 'static,
C::Future: Send,
impl<S, P, C> Service<M2mRequest> for M2mApiService<S, P, C>where
S: Service<SequencerRequest, Response = SequencerResponse, Error = TraceabilityError> + Clone + Send + 'static,
S::Future: Send,
P: Service<ProvenanceRequest, Response = ProvenanceResponse, Error = TraceabilityError> + Clone + Send + NodeId + 'static,
P::Future: Send,
C: Service<ComplianceRequest, Response = ComplianceResponse, Error = TraceabilityError> + Clone + Send + 'static,
C::Future: Send,
Source§type Response = M2mResponse
type Response = M2mResponse
Source§type Error = TraceabilityError
type Error = TraceabilityError
Source§type Future = Pin<Box<dyn Future<Output = Result<<M2mApiService<S, P, C> as Service<M2mRequest>>::Response, <M2mApiService<S, P, C> as Service<M2mRequest>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<M2mApiService<S, P, C> as Service<M2mRequest>>::Response, <M2mApiService<S, P, C> as Service<M2mRequest>>::Error>> + Send>>
Source§fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
Poll::Ready(Ok(()))
when the service is able to process requests. Read moreSource§fn call(&mut self, request: M2mRequest) -> Self::Future
fn call(&mut self, request: M2mRequest) -> Self::Future
Source§impl Service<M2mRequest> for M2mGrpc
impl Service<M2mRequest> for M2mGrpc
Source§type Response = M2mResponse
type Response = M2mResponse
Source§type Error = TraceabilityError
type Error = TraceabilityError
Source§type Future = Pin<Box<dyn Future<Output = Result<<M2mGrpc as Service<M2mRequest>>::Response, <M2mGrpc as Service<M2mRequest>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<M2mGrpc as Service<M2mRequest>>::Response, <M2mGrpc as Service<M2mRequest>>::Error>> + Send>>
Source§fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
Poll::Ready(Ok(()))
when the service is able to process requests. Read moreSource§fn call(&mut self, request: M2mRequest) -> Self::Future
fn call(&mut self, request: M2mRequest) -> Self::Future
Source§impl Service<M2mRequest> for M2mLoopback
impl Service<M2mRequest> for M2mLoopback
Source§type Response = M2mResponse
type Response = M2mResponse
Source§type Error = TraceabilityError
type Error = TraceabilityError
Source§type Future = Pin<Box<dyn Future<Output = Result<<M2mLoopback as Service<M2mRequest>>::Response, <M2mLoopback as Service<M2mRequest>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<M2mLoopback as Service<M2mRequest>>::Response, <M2mLoopback as Service<M2mRequest>>::Error>> + Send>>
Source§fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
Poll::Ready(Ok(()))
when the service is able to process requests. Read moreSource§fn call(&mut self, request: M2mRequest) -> Self::Future
fn call(&mut self, request: M2mRequest) -> Self::Future
Source§impl Service<M2mRequest> for M2mNop
Implementation of the M2M service interface for the no-op transport.
impl Service<M2mRequest> for M2mNop
Implementation of the M2M service interface for the no-op transport.
This implementation handles all M2M request types by returning appropriate default responses without performing any actual distributed operations. All requests complete immediately and successfully.
Source§fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
Always reports ready to handle requests immediately.
Source§fn call(&mut self, request: M2mRequest) -> Self::Future
fn call(&mut self, request: M2mRequest) -> Self::Future
Handles M2M requests by returning appropriate default responses.
§Request Handling
- GetDestinationCompliance: Returns a default policy with public confidentiality, zero integrity, not deleted, and consent given
- GetSourceCompliance: Returns an empty policy map indicating no source policies are available
- UpdateProvenance: Acknowledges the request without performing any provenance updates
Source§type Response = M2mResponse
type Response = M2mResponse
Source§type Error = TraceabilityError
type Error = TraceabilityError
Auto Trait Implementations§
impl Freeze for M2mRequest
impl RefUnwindSafe for M2mRequest
impl Send for M2mRequest
impl Sync for M2mRequest
impl Unpin for M2mRequest
impl UnwindSafe for M2mRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered
].