Enum O2mRequest

Source
pub enum O2mRequest {
    GetPolicies(HashSet<Resource>),
    SetPolicy {
        resource: Resource,
        policy: Policy,
    },
    SetConfidentiality {
        resource: Resource,
        confidentiality: ConfidentialityPolicy,
    },
    SetIntegrity {
        resource: Resource,
        integrity: u32,
    },
    SetDeleted(Resource),
    SetConsent(Resource),
    GetReferences(Resource),
}
Expand description

Operator-to-Middleware (O2M) request types.

Administrative requests from external operators, compliance officers, and organizations for policy management and provenance analysis. These operations typically require elevated privileges and are used for governance and audit purposes.

Variants§

§

GetPolicies(HashSet<Resource>)

Retrieve current compliance policies for a set of resources.

Enables operators to audit current policy configurations and verify compliance with organizational or regulatory requirements.

§

SetPolicy

Set a complete compliance policy for a specific resource.

Replaces the existing policy with a new configuration that defines confidentiality, integrity, and access control requirements.

Fields

§resource: Resource

Target resource to apply the policy to

§policy: Policy

New policy configuration

§

SetConfidentiality

Set confidentiality requirements for a specific resource.

Updates only the confidentiality aspects of the resource’s policy, leaving other policy components unchanged.

Fields

§resource: Resource

Target resource to update

§confidentiality: ConfidentialityPolicy

New confidentiality policy requirements

§

SetIntegrity

Set integrity level requirements for a specific resource.

Updates the minimum integrity level required for data flows involving this resource, typically on a scale from 0 (lowest) to higher values.

Fields

§resource: Resource

Target resource to update

§integrity: u32

Minimum integrity level (higher values indicate stricter requirements)

§

SetDeleted(Resource)

Mark a resource as deleted for compliance and audit purposes.

Indicates that the resource has been removed from the system while preserving its historical provenance for audit trails.

§

SetConsent(Resource)

Grant consent for data processing operations on a resource.

Sets the consent flag to allow data flows and processing operations that require explicit permission, typically for privacy compliance.

§

GetReferences(Resource)

Retrieve the complete provenance lineage for a resource.

Returns all upstream resources and middleware nodes that have contributed data to the specified resource, enabling full traceability analysis.

Trait Implementations§

Source§

impl<P, C> Service<O2mRequest> for O2mApiService<P, C>
where 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 = O2mResponse

Responses given by the service.
Source§

type Error = TraceabilityError

Errors produced by the service.
Source§

type Future = Pin<Box<dyn Future<Output = Result<<O2mApiService<P, C> as Service<O2mRequest>>::Response, <O2mApiService<P, C> as Service<O2mRequest>>::Error>> + Send>>

The future response value.
Source§

fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, request: O2mRequest) -> Self::Future

Process the request and return the response asynchronously. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more