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 router label is a network lookup and not done here — pass the label you already hold.
Implementations§
Source§impl Target
impl Target
Sourcepub fn new(label: Option<String>, program: Option<Address>) -> Self
pub fn new(label: Option<String>, program: Option<Address>) -> Self
A target matched by label, program, or both. With neither, nothing matches.
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
Whether a quoted hop is the target’s. 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
Whether a filled hop is the target’s. The program wins when given; a label-only target falls back to the label.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Target
impl Freeze for Target
impl Move for Target
impl RefUnwindSafe for Target
impl Send for Targetwhere
RawVecInner: Send,
impl Sync for Targetwhere
RawVecInner: Sync,
impl Unpin for Target
impl UnsafeUnpin for Target
impl UnwindSafe for Targetwhere
RawVecInner: UnwindSafe,
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