pub struct IncomingResources<C>where
C: ResourceTable<IncomingResourceState>,{ /* private fields */ }Implementations§
Source§impl<C> IncomingResources<C>where
C: ResourceTable<IncomingResourceState>,
impl<C> IncomingResources<C>where
C: ResourceTable<IncomingResourceState>,
Sourcepub fn accept(
&mut self,
link_id: LinkId,
offer: AcceptedResource<'_>,
) -> Result<usize, AcceptIncomingResourceError>
pub fn accept( &mut self, link_id: LinkId, offer: AcceptedResource<'_>, ) -> Result<usize, AcceptIncomingResourceError>
The capacity and shape gate the engine asks at accept; policy gating happens before the offer ever reaches the table.
The duplicate refusal is RNS 1.4.2 Resource.accept’s has_incoming_resource registration gate.
Sourcepub fn apply_hashmap_update(
&mut self,
index: usize,
segment: u64,
names: &[u8],
) -> Result<usize, ApplyHashmapUpdateError>
pub fn apply_hashmap_update( &mut self, index: usize, segment: u64, names: &[u8], ) -> Result<usize, ApplyHashmapUpdateError>
RNS 1.4.2 Resource.hashmap_update. We refuse two shapes the reference mishandles:
- Names past the part count: an
IndexErroroff its fixed-length[None] * total_partslist, uncaught until the delivering interface’s read loop, which tears the whole interface down. - A segment that skips ahead of the height: lands silently while
hashmap_height(a fill count, not a prefix height) inflates, sorequest_nextreadsNoneholes.
As the receiver we drive the requests, so a hole can only come from a sender we should not trust.
Sourcepub fn place_part(
&mut self,
index: usize,
at_part_index: usize,
bytes: &[u8],
) -> PlacePartOutcome
pub fn place_part( &mut self, index: usize, at_part_index: usize, bytes: &[u8], ) -> PlacePartOutcome
RNS 1.4.2 Resource.receive_part’s bookkeeping half.
A part before the last must fill the sdu exactly: parts land at index × sdu, so a short middle part could only corrupt.
pub fn lookup(&self, link_id: &LinkId, hash: &ResourceHash) -> Option<usize>
pub fn state(&self, index: usize) -> &IncomingResourceState
pub fn state_mut(&mut self, index: usize) -> &mut IncomingResourceState
Sourcepub fn sealed_transfer(&self, index: usize) -> &[u8] ⓘ
pub fn sealed_transfer(&self, index: usize) -> &[u8] ⓘ
Never payload bytes: once complete, the transfer opens in place and the plaintext emerges as a sub-slice.
Sourcepub fn transfer_and_streamed_open_mut(
&mut self,
index: usize,
) -> (&mut [u8], &mut OpenProgress)
pub fn transfer_and_streamed_open_mut( &mut self, index: usize, ) -> (&mut [u8], &mut OpenProgress)
The sealed transfer and its streamed-open slot, borrowed together: the frontier advance and the conclusion walk them in lockstep. Never payload bytes: the transfer opens in place and the plaintext emerges as a sub-slice.
Sourcepub fn transfer_and_streamed_open(&self, index: usize) -> (&[u8], &OpenProgress)
pub fn transfer_and_streamed_open(&self, index: usize) -> (&[u8], &OpenProgress)
The read-only pair for the offload’s owed-span scan and job view.