pub struct RootedUnitSource { /* private fields */ }Expand description
A rooted source opened ONCE for a read in admitted units: the bounded
import read of a history transcript above the read cap (core::import).
The path decision and the open are those of the rooted admitted reader:
path jail and secret-path rule first, then one descriptor-relative
no-follow open under the root. Everything after that — the size, every
byte, every admission — is taken from THIS descriptor; the path is never
opened a second time. The raw bytes stay with the caller only until
Self::admit_unit has decided on them.
ONE rule set judges every unit and seam of the source and is the one the
unit-safety inspection reads: the pack through the source view the caller
must hold open (policy::runtime::with_project_source_view — inside it
policy::runtime::active() is the pinned snapshot, and the view fails if
pack or role changed by its end), the gateway rules through gateway,
captured once here and passed into every admission.
Implementations§
Source§impl RootedUnitSource
impl RootedUnitSource
Sourcepub fn admit_records(
&mut self,
bounds: UnitBounds,
sink: impl FnMut(&str) -> Result<(), UnitRefusal>,
) -> Result<(), UnitRefusal>
pub fn admit_records( &mut self, bounds: UnitBounds, sink: impl FnMut(&str) -> Result<(), UnitRefusal>, ) -> Result<(), UnitRefusal>
Read this source to its end in units of complete records and hand the
admitted text of each unit, in file order, to sink.
Each unit is admitted on its ORIGINAL bytes (Self::admit_unit),
after the seam with the unit before it (Self::admit_seam). Only
what may feed a derived store is handed out; any other outcome, of a
seam as of a unit, refuses the whole source. On Err the caller must
take over nothing sink has seen.
Trait Implementations§
Auto Trait Implementations§
impl Forget for RootedUnitSource
impl Freeze for RootedUnitSourcewhere
I32NotAllOnes: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<DestinationConstraintV1>: Freeze,
PhantomData<DestinationV1>: Freeze,
PhantomData<String>: Freeze,
*const ArcInner<IntelligenceRuntimeConfig> is !null: Freeze,
PhantomData<ArcInner<IntelligenceRuntimeConfig>>: Freeze,
impl Move for RootedUnitSource
impl RefUnwindSafe for RootedUnitSource
impl Send for RootedUnitSource
impl Sync for RootedUnitSource
impl Unpin for RootedUnitSource
impl UnsafeUnpin for RootedUnitSourcewhere
I32NotAllOnes: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<DestinationConstraintV1>: UnsafeUnpin,
PhantomData<DestinationV1>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
*const ArcInner<IntelligenceRuntimeConfig> is !null: UnsafeUnpin,
PhantomData<ArcInner<IntelligenceRuntimeConfig>>: UnsafeUnpin,
impl UnwindSafe for RootedUnitSourcewhere
I32NotAllOnes: UnwindSafe,
RawVecInner: UnwindSafe,
Arc<IntelligenceRuntimeConfig>: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> ⓘ
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