pub struct ProfileRegistry {
profiles: Vec<Box<dyn Profile>>,
}Expand description
Registry for profiles (TOML, Lua, and custom Rust).
Use ProfileRegistry::from_config to create a registry pre-loaded
with all profiles from the config file, then optionally call
register to add custom Rust profiles.
§Example
use context_harness::profiles::ProfileRegistry;
let mut profiles = ProfileRegistry::new();
// profiles.register(Box::new(MyProfile::new()));Fields§
§profiles: Vec<Box<dyn Profile>>Implementations§
Source§impl ProfileRegistry
impl ProfileRegistry
Sourcepub fn from_config(config: &Config) -> Result<Self>
pub fn from_config(config: &Config) -> Result<Self>
Create a registry pre-loaded with all profiles from config.
Loads inline TOML profiles from [profiles.inline.*] entries.
Lua script profiles from [profiles.script.*] are loaded separately
via crate::profile_script::load_profile_definitions.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ProfileRegistry
impl !UnwindSafe for ProfileRegistry
impl Freeze for ProfileRegistry
impl Send for ProfileRegistry
impl Sync for ProfileRegistry
impl Unpin for ProfileRegistry
impl UnsafeUnpin for ProfileRegistry
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<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 moreimpl<T> MaybeSend for Twhere
T: Send,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().