pub struct Bundle<Metadata>where
Metadata: Serialize,{
manifest: Manifest<Metadata>,
subjects: Subjects,
sessions: Sessions,
proposals: Proposals,
beamlines: Beamlines,
static_data: HashMap<String, Vec<u8>>,
}
Expand description
The contents of the Open Policy Agent bundle
Fields§
§manifest: Manifest<Metadata>
The manifest file, which contains data about the bundle and optional additonal metadata
subjects: Subjects
A mapping of subjects to their various attributes
sessions: Sessions
A mapping of sessions to their various attributes
proposals: Proposals
A mapping of proposals to their various attributes
beamlines: Beamlines
A mapping of beamlines to their various attributes
static_data: HashMap<String, Vec<u8>>
A map (name to data) of static files to include in the bundle
Implementations§
source§impl<Metadata> Bundle<Metadata>
impl<Metadata> Bundle<Metadata>
sourcepub fn new(
metadata: Metadata,
subjects: Subjects,
sessions: Sessions,
proposals: Proposals,
beamlines: Beamlines,
static_data: HashMap<String, Vec<u8>>,
) -> Self
pub fn new( metadata: Metadata, subjects: Subjects, sessions: Sessions, proposals: Proposals, beamlines: Beamlines, static_data: HashMap<String, Vec<u8>>, ) -> Self
sourcepub async fn fetch(
metadata: Metadata,
static_data: &[StaticDataGlob],
ispyb_pool: &MySqlPool,
) -> Result<Self, Error>
pub async fn fetch( metadata: Metadata, static_data: &[StaticDataGlob], ispyb_pool: &MySqlPool, ) -> Result<Self, Error>
Trait Implementations§
Auto Trait Implementations§
impl<Metadata> Freeze for Bundle<Metadata>where
Metadata: Freeze,
impl<Metadata> RefUnwindSafe for Bundle<Metadata>where
Metadata: RefUnwindSafe,
impl<Metadata> Send for Bundle<Metadata>where
Metadata: Send,
impl<Metadata> Sync for Bundle<Metadata>where
Metadata: Sync,
impl<Metadata> Unpin for Bundle<Metadata>where
Metadata: Unpin,
impl<Metadata> UnwindSafe for Bundle<Metadata>where
Metadata: 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
Mutably borrows from an owned value. Read more
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Wrap the input message
T
in a tonic::Request