pub struct Lineage { /* private fields */ }Expand description
What a delivered text derives from.
Implementations§
Source§impl Lineage
impl Lineage
Sourcepub fn of_files(authority: ArchiveAuthority) -> Self
pub fn of_files(authority: ArchiveAuthority) -> Self
Lineage of text derived from project files only.
Sourcepub fn of_presented(presented: Vec<PresentedBinding>) -> Self
pub fn of_presented(presented: Vec<PresentedBinding>) -> Self
Lineage of text derived from caller-supplied sources only. An empty set is not a lineage: it is unknown.
Sourcepub fn join(&mut self, other: Self)
pub fn join(&mut self, other: Self)
Union with another lineage of the same text. A source only one side names is added, never dropped; the text then needs every source of both. Parts of different projects make the lineage unknown. Call ids are not sources: the other side’s are dropped, this side’s stay.
Sourcepub fn publish_files(&self)
pub fn publish_files(&self)
Publish this lineage into the current call’s source capture, for a
declared tool whose reply is derived from text with this lineage and
from nothing else (ctx_expand on a resolved recovery copy). The
release point then records the reply as it is delivered.
The capture carries project files only: a file-only lineage is published; a lineage that names a caller-presented source, and an incomplete one, mark the capture incomplete — that reply stays unknown rather than being recorded under its file part alone.
Sourcepub fn presented_source_ids(&self) -> Option<Vec<String>>
pub fn presented_source_ids(&self) -> Option<Vec<String>>
The ids of the sources of a lineage that names caller-supplied
sources ONLY, sorted and distinct. None for every other lineage: a
file source, an incomplete lineage, no source. The ids are
content-free and authorize nothing — ask Lineage::still_admitted.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Whether the lineage names every source of its text.
Sourcepub fn still_admitted(&self) -> Result<(), LineageRefusal>
pub fn still_admitted(&self) -> Result<(), LineageRefusal>
Current authority of every bound source. Call inside the
REQUEST_PROJECT scope of the request the text returns in.
- files: every file is re-read through the admitted rooted reader under the current policy and role and must be unchanged, complete and storable;
- presented: project, caller and role must be those of the request, and a presentation of exactly that binding must exist that was admitted under the current policy identity within the validity. This says nothing about the caller’s or a provider’s own copy.
Sourcepub fn still_permitted(&self) -> Result<(), LineageRefusal>
pub fn still_permitted(&self) -> Result<(), LineageRefusal>
Current permission of every bound source, for returning a
provider-sealed item (#2177). Call inside the REQUEST_PROJECT scope
of the request the item returns in.
Identical to Lineage::still_admitted except for the files: every
file must still be permitted for its tool under the current policy
and role, complete and storable (not restricted, E3), but it may have
CHANGED since it was read (ArchiveAuthority::still_permitted). A
read → think → edit loop therefore keeps its sealed items; a source
that is gone, withheld or restricted refuses them. Presented bindings
are checked exactly as in Lineage::still_admitted.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Lineage
impl<'de> Deserialize<'de> for Lineage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Lineage
impl StructuralPartialEq for Lineage
Auto Trait Implementations§
impl Forget for Lineage
impl Freeze for Lineage
impl Move for Lineage
impl RefUnwindSafe for Lineage
impl Send for Lineage
impl Sync for Lineage
impl Unpin for Lineage
impl UnsafeUnpin for Lineage
impl UnwindSafe for Lineage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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