Struct precedence_net::NetworkBuilder
source · [−]pub struct NetworkBuilder { /* private fields */ }
Implementations
sourceimpl NetworkBuilder
impl NetworkBuilder
sourcepub fn add_activity(&mut self, reference: &str, duration: f64) -> Result<()>
pub fn add_activity(&mut self, reference: &str, duration: f64) -> Result<()>
Add an activity to the network.
The reference
and description
of the activity will be set to reference
. The minimum_duration
, expected_duration
and maximum_duration
will all be set to duration
. The start_type
will be set to StartType::Earliest
and the duration_type
will be set to DurationType::Expected
.
sourcepub fn remove_activity(&mut self, reference: &str) -> Result<()>
pub fn remove_activity(&mut self, reference: &str) -> Result<()>
Removes an activity and all edges associated with it
pub fn remove_edge(
&mut self,
origin_reference: &str,
target_reference: &str
) -> Result<()>
sourcepub fn add_extended_activity(
&mut self,
reference: &str,
description: &str,
minimum_duration: f64,
expected_duration: f64,
maximum_duration: f64,
start_type: StartType,
duration_type: DurationType
) -> Result<()>
pub fn add_extended_activity(
&mut self,
reference: &str,
description: &str,
minimum_duration: f64,
expected_duration: f64,
maximum_duration: f64,
start_type: StartType,
duration_type: DurationType
) -> Result<()>
Add a customised activity to the network.
This method is for creating activities with differing durations, start types or duration types.
ⓘ
network_builder.add_extended_activity("develop",
"Develop System",
1.0, 3.0, 5.0,
StartType::Earliest,
DurationType::Expected)?;
Trait Implementations
sourceimpl Default for NetworkBuilder
impl Default for NetworkBuilder
sourcefn default() -> NetworkBuilder
fn default() -> NetworkBuilder
Returns the “default value” for a type. Read more
sourceimpl From<&Network> for NetworkBuilder
impl From<&Network> for NetworkBuilder
sourcefn from(network: &Network) -> NetworkBuilder
fn from(network: &Network) -> NetworkBuilder
Converts to this type from the input type.
sourceimpl From<Network> for NetworkBuilder
impl From<Network> for NetworkBuilder
sourcefn from(network: Network) -> NetworkBuilder
fn from(network: Network) -> NetworkBuilder
Converts to this type from the input type.
sourceimpl TryFrom<&mut NetworkBuilder> for Network
impl TryFrom<&mut NetworkBuilder> for Network
Auto Trait Implementations
impl RefUnwindSafe for NetworkBuilder
impl Send for NetworkBuilder
impl Sync for NetworkBuilder
impl Unpin for NetworkBuilder
impl UnwindSafe for NetworkBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more