CodePackageActivationContext

Struct CodePackageActivationContext 

Source
pub struct CodePackageActivationContext { /* private fields */ }

Implementations§

Source§

impl CodePackageActivationContext

Source

pub fn create() -> Result<CodePackageActivationContext, Error>

Source

pub fn get_endpoint_resource( &self, serviceendpointresourcename: &WString, ) -> Result<EndpointResourceDescription>

Source

pub fn get_configuration_package( &self, configpackagename: &WString, ) -> Result<ConfigurationPackage>

Source

pub fn get_code_package_info(&self) -> CodePackageInfo

Source

pub fn get_code_package_names(&self) -> Vec<WString>

Source

pub fn get_code_package(&self, name: &WString) -> Result<CodePackage>

Source

pub fn report_application_health( &self, healthinfo: &HealthInformation, send_options: Option<&HealthReportSendOption>, ) -> Result<()>

The health information describes the report details, like the source ID, the property, the health state and other relevant details. The code package activation context uses an internal health client to send the reports to the health store. The client optimizes messages to Health Manager by batching reports per a configured duration (Default: 30 seconds). If the report has high priority, you can specify send options to send it immediately.

Possible Errors: FABRIC_E_HEALTH_STALE_REPORT: HealthReport already exist for the same entity, SourceId and Property with same or higher SequenceNumber. FABRIC_E_HEALTH_MAX_REPORTS_REACHED: HeathClient has reached the maximum number of health reports that can accept for processing. More reports will be accepted when progress is done with the currently accepted reports. By default, the FabricClient.HealthClient can accept 10000 different reports.

Source

pub fn get_com(&self) -> IFabricCodePackageActivationContext6

Source

pub fn register_configuration_package_change_handler<T>( &self, handler: T, ) -> Result<ConfigurationPackageChangeCallbackHandle>
where T: Fn(&ConfigurationPackageChangeEvent) + 'static,

Register a configuration package change handler callback Consider using [AutoConfigurationPackageChangeCallbackHandle::new] instead of this directly.

Source

pub fn unregister_configuration_package_change_handler( &self, handle: ConfigurationPackageChangeCallbackHandle, ) -> Result<()>

Trait Implementations§

Source§

impl Clone for CodePackageActivationContext

Source§

fn clone(&self) -> CodePackageActivationContext

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CodePackageActivationContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<IFabricCodePackageActivationContext6> for CodePackageActivationContext

Source§

fn from(value: IFabricCodePackageActivationContext6) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CanInto<T> for T
where T: Clone,

Source§

const QUERY: bool = false

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more