pub struct RestrictionMap {
pub node_id: String,
pub budget: ContextBudget,
pub owned_files: Vec<String>,
pub sealed_interfaces: Vec<String>,
pub structural_digests: Vec<StructuralDigest>,
pub summary_digests: Vec<SummaryDigest>,
pub dependency_commits: HashMap<String, Vec<u8>>,
}Expand description
PSP-5 Phase 3: Restriction map defining a node’s context boundary
The restriction map bounds what a node can see. It is derived from the task graph, ownership manifest, and parent scope. A node SHALL NOT receive the full repository by default.
Fields§
§node_id: StringThe node this restriction applies to
budget: ContextBudgetContext budget (byte and file-count limits)
owned_files: Vec<String>Files the node owns and can see in full
sealed_interfaces: Vec<String>Adjacent sealed interfaces the node can reference
structural_digests: Vec<StructuralDigest>Structural digests for external dependencies (preferred over raw files)
summary_digests: Vec<SummaryDigest>Summary digests for advisory context
dependency_commits: HashMap<String, Vec<u8>>Dependency commit hashes this node relies on
Implementations§
Source§impl RestrictionMap
impl RestrictionMap
Sourcepub fn for_node(node_id: impl Into<String>) -> RestrictionMap
pub fn for_node(node_id: impl Into<String>) -> RestrictionMap
Create a restriction map for a node with default budget
Sourcepub fn structural_bytes(&self) -> usize
pub fn structural_bytes(&self) -> usize
Total structural bytes (approximation)
Trait Implementations§
Source§impl Clone for RestrictionMap
impl Clone for RestrictionMap
Source§fn clone(&self) -> RestrictionMap
fn clone(&self) -> RestrictionMap
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RestrictionMap
impl Debug for RestrictionMap
Source§impl Default for RestrictionMap
impl Default for RestrictionMap
Source§fn default() -> RestrictionMap
fn default() -> RestrictionMap
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RestrictionMap
impl<'de> Deserialize<'de> for RestrictionMap
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RestrictionMap, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RestrictionMap, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for RestrictionMap
impl Serialize for RestrictionMap
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for RestrictionMap
impl RefUnwindSafe for RestrictionMap
impl Send for RestrictionMap
impl Sync for RestrictionMap
impl Unpin for RestrictionMap
impl UnsafeUnpin for RestrictionMap
impl UnwindSafe for RestrictionMap
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> 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>
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 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>
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