pub struct RunDocumentAccess {
pub namespace: String,
pub workflow_type: String,
pub content_hash: String,
/* private fields */
}Expand description
An authorized read of one workflow’s document under one package hash: the caller is scoped, the workflow is theirs, and the hash is one the workflow’s own history recorded. Holds the scoped engine so the archive read that follows happens in the same scope the check ran in.
Fields§
§namespace: StringThe namespace the caller was scoped to.
workflow_type: StringThe workflow type the LATEST generation that recorded content_hash
started as — the archive entry the document is registered under. The
resource is “the document that produced this history segment”, so the
type comes from the generation that ran it, never from the summary
(whose type belongs to the latest generation, which may never have
run this package). When two generations recorded the same hash under
different types (continue-as-new back onto an old package after a
rename), the later one labels the answer; the type only labels.
content_hash: StringThe canonical 64-hex content hash, as requested.
Implementations§
Source§impl RunDocumentAccess
impl RunDocumentAccess
Sourcepub async fn read(&self) -> Result<DeployedDocument, WireError>
pub async fn read(&self) -> Result<DeployedDocument, WireError>
Reads the archived document this access was granted for.
§Errors
Returns the archive reader’s refusals as stable WireErrors: the
version is not persisted here (DeployedVersionNotFound, 404), the
archive carries no AWL source (DeployedAwlSourceAbsent, 404 — a
Gleam-authored package has no document to show), or the archive cannot
be read or staged (a backend error).
Trait Implementations§
Source§impl Clone for RunDocumentAccess
impl Clone for RunDocumentAccess
Source§fn clone(&self) -> RunDocumentAccess
fn clone(&self) -> RunDocumentAccess
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for RunDocumentAccess
impl !UnwindSafe for RunDocumentAccess
impl Freeze for RunDocumentAccess
impl Send for RunDocumentAccess
impl Sync for RunDocumentAccess
impl Unpin for RunDocumentAccess
impl UnsafeUnpin for RunDocumentAccess
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,
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> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request