pub enum P2mRequest {
LocalEnroll {
pid: i32,
fd: i32,
path: String,
},
RemoteEnroll {
pid: i32,
fd: i32,
local_socket: String,
peer_socket: String,
},
IoRequest {
pid: i32,
fd: i32,
output: bool,
},
IoReport {
pid: i32,
fd: i32,
grant_id: u128,
result: bool,
},
}
Expand description
Process-to-Middleware (P2M) request types.
These requests are initiated by application processes to the middleware for resource enrollment and I/O operation authorization. The workflow typically follows:
- Enroll resources using
LocalEnroll
orRemoteEnroll
- Request I/O permission using
IoRequest
- Report operation completion using
IoReport
Variants§
LocalEnroll
Register a file resource with the middleware for traceability tracking.
Must be called before any I/O operations on the file. The middleware will create appropriate resource identifiers and establish compliance policies.
Fields
RemoteEnroll
Register a network stream resource with the middleware for traceability tracking.
Used for TCP connections. Both endpoints must be specified to enable proper flow tracking.
Fields
IoRequest
Request authorization to perform an I/O operation on a previously enrolled resource.
The middleware will evaluate compliance policies, check data lineage requirements, and coordinate with remote middleware instances if necessary before granting access.
Fields
IoReport
Report the completion status of a previously authorized I/O operation.
This enables the middleware to update provenance records, release flow reservations, and maintain accurate audit trails for compliance purposes.
Trait Implementations§
Source§impl Clone for P2mRequest
impl Clone for P2mRequest
Source§fn clone(&self) -> P2mRequest
fn clone(&self) -> P2mRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for P2mRequest
impl Debug for P2mRequest
Source§impl<S, P, C, M> Service<P2mRequest> for P2mApiService<S, P, C, M>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,
M: Service<M2mRequest, Response = M2mResponse, Error = TraceabilityError> + Clone + Send + 'static,
M::Future: Send,
impl<S, P, C, M> Service<P2mRequest> for P2mApiService<S, P, C, M>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,
M: Service<M2mRequest, Response = M2mResponse, Error = TraceabilityError> + Clone + Send + 'static,
M::Future: Send,
Source§type Response = P2mResponse
type Response = P2mResponse
Source§type Error = TraceabilityError
type Error = TraceabilityError
Source§type Future = Pin<Box<dyn Future<Output = Result<<P2mApiService<S, P, C, M> as Service<P2mRequest>>::Response, <P2mApiService<S, P, C, M> as Service<P2mRequest>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<P2mApiService<S, P, C, M> as Service<P2mRequest>>::Response, <P2mApiService<S, P, C, M> as Service<P2mRequest>>::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: P2mRequest) -> Self::Future
fn call(&mut self, request: P2mRequest) -> Self::Future
Auto Trait Implementations§
impl Freeze for P2mRequest
impl RefUnwindSafe for P2mRequest
impl Send for P2mRequest
impl Sync for P2mRequest
impl Unpin for P2mRequest
impl UnwindSafe for P2mRequest
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
].