pub struct Target { /* private fields */ }Expand description
The venue under test, as the two sides can each name it.
Either key alone works; both is strictest. Resolving a program to its metis label is a network lookup and not done here — pass the label you already hold.
Implementations§
Source§impl Target
impl Target
pub fn new(label: Option<String>, program: Option<Address>) -> Self
pub fn label(&self) -> Option<&str>
pub fn program(&self) -> Option<Address>
Sourcepub fn claims_quoted(&self, hop: &RouteHop) -> bool
pub fn claims_quoted(&self, hop: &RouteHop) -> bool
The quote plan names no program, so the label is the only key it can be matched on.
Sourcepub fn claims_fill(&self, hop: &RouteHop) -> bool
pub fn claims_fill(&self, hop: &RouteHop) -> bool
The program wins when given; the label fallback is what lets a label-only target measure this side instead of reporting zero.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Target
impl RefUnwindSafe for Target
impl Send for Target
impl Sync for Target
impl Unpin for Target
impl UnsafeUnpin for Target
impl UnwindSafe for Target
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