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: SubjectsA mapping of subjects to their various attributes
sessions: SessionsA mapping of sessions to their various attributes
proposals: ProposalsA mapping of proposals to their various attributes
beamlines: BeamlinesA 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> 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>
Converts
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>
Converts
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 moreSource§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