pub struct CoreProfile { /* private fields */ }Expand description
Provider-independent profile advertised by one executable core.
Implementations§
Source§impl CoreProfile
impl CoreProfile
Sourcepub fn new(
role: CoreRole,
service_id: ServiceId,
capabilities: impl IntoIterator<Item = CapabilityId>,
leadership: LeadershipRequirement,
resources: ResourceProfile,
scheduling: SchedulingProfile,
) -> ContractResult<Self>
pub fn new( role: CoreRole, service_id: ServiceId, capabilities: impl IntoIterator<Item = CapabilityId>, leadership: LeadershipRequirement, resources: ResourceProfile, scheduling: SchedulingProfile, ) -> ContractResult<Self>
Creates a profile whose leadership lease is scoped to the same service.
Sourcepub fn service_id(&self) -> &ServiceId
pub fn service_id(&self) -> &ServiceId
Returns the service coordinated by this profile.
Sourcepub fn capabilities(&self) -> &BTreeSet<CapabilityId>
pub fn capabilities(&self) -> &BTreeSet<CapabilityId>
Returns advertised capabilities.
Sourcepub fn leadership(&self) -> &LeadershipRequirement
pub fn leadership(&self) -> &LeadershipRequirement
Returns service-scoped leadership requirements.
Sourcepub fn resources(&self) -> &ResourceProfile
pub fn resources(&self) -> &ResourceProfile
Returns the resource profile.
Sourcepub fn scheduling(&self) -> &SchedulingProfile
pub fn scheduling(&self) -> &SchedulingProfile
Returns scheduler inputs.
Trait Implementations§
Source§impl Clone for CoreProfile
impl Clone for CoreProfile
Source§fn clone(&self) -> CoreProfile
fn clone(&self) -> CoreProfile
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CoreProfile
impl Debug for CoreProfile
Source§impl<'de> Deserialize<'de> for CoreProfile
impl<'de> Deserialize<'de> for CoreProfile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CoreProfile
Source§impl PartialEq for CoreProfile
impl PartialEq for CoreProfile
Source§impl Serialize for CoreProfile
impl Serialize for CoreProfile
impl StructuralPartialEq for CoreProfile
Auto Trait Implementations§
impl Freeze for CoreProfile
impl RefUnwindSafe for CoreProfile
impl Send for CoreProfile
impl Sync for CoreProfile
impl Unpin for CoreProfile
impl UnsafeUnpin for CoreProfile
impl UnwindSafe for CoreProfile
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