pub struct FmlClient { /* private fields */ }
Implementations§
Source§impl FmlClient
impl FmlClient
pub fn get_feature_ids(&self) -> Vec<String>
pub fn get_feature_descriptor(&self, id: String) -> Option<FmlFeatureDescriptor>
pub fn get_feature_descriptors(&self) -> Vec<FmlFeatureDescriptor>
Source§impl FmlClient
impl FmlClient
pub fn get_feature_inspector( &self, id: String, ) -> Option<Arc<FmlFeatureInspector>>
Source§impl FmlClient
impl FmlClient
Sourcepub fn new(manifest_path: String, channel: String) -> Result<Self>
pub fn new(manifest_path: String, channel: String) -> Result<Self>
Constructs a new FmlClient object.
Definitions of the parameters are as follows:
manifest_path
: The path (relative to the current working directory) to the fml.yml that should be loaded.channel
: The channel that should be loaded for the manifest.
pub fn new_with_ref( manifest_path: String, channel: String, ref_: Option<String>, ) -> Result<Self>
pub fn new_with_config( manifest_path: String, channel: String, config: FmlLoaderConfig, ) -> Result<Self>
Sourcepub fn merge(
&self,
feature_configs: HashMap<String, Map<String, Value>>,
) -> Result<MergedJsonWithErrors>
pub fn merge( &self, feature_configs: HashMap<String, Map<String, Value>>, ) -> Result<MergedJsonWithErrors>
Validates a supplied list of feature configurations. The valid configurations will be merged into the manifest’s default feature JSON, and invalid configurations will be returned as a list of their respective errors.
Sourcepub fn get_default_json(&self) -> Result<String>
pub fn get_default_json(&self) -> Result<String>
Returns the default feature JSON for the loaded FML’s selected channel.
Sourcepub fn get_coenrolling_feature_ids(&self) -> Result<Vec<String>>
pub fn get_coenrolling_feature_ids(&self) -> Result<Vec<String>>
Returns a list of feature ids that support coenrollment.
Trait Implementations§
§impl<UT> LowerError<UT> for FmlClient
impl<UT> LowerError<UT> for FmlClient
§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Lower this value for scaffolding function return Read more
§impl<UT> LowerReturn<UT> for FmlClient
impl<UT> LowerReturn<UT> for FmlClient
§type ReturnType = <Arc<FmlClient> as LowerReturn<UniFfiTag>>::ReturnType
type ReturnType = <Arc<FmlClient> as LowerReturn<UniFfiTag>>::ReturnType
The type that should be returned by scaffolding functions for this type. Read more
§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
Lower the return value from an scaffolding call Read more
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Lower the return value for failed argument lifts Read more
§impl<UT> TypeId<UT> for FmlClient
impl<UT> TypeId<UT> for FmlClient
const TYPE_ID_META: MetadataBuffer
Auto Trait Implementations§
impl Freeze for FmlClient
impl RefUnwindSafe for FmlClient
impl Send for FmlClient
impl Sync for FmlClient
impl Unpin for FmlClient
impl UnwindSafe for FmlClient
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, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
Read more