Struct erpc_scanner::work::IncompleteWork
source · pub struct IncompleteWork {
pub source_relay: String,
pub destination_relay: String,
}
Expand description
The metadata about the two hop circuit we want to create.
It represents the two hop circuit that needs to be created where source_relay
represents the guard relay of the two hop and destination_relay
represents
the exit relay of the two hop circuit
Fields§
§source_relay: String
Metadata to identify the source relay
destination_relay: String
Metadata to identify the destination relay
Implementations§
source§impl IncompleteWork
impl IncompleteWork
sourcepub fn from<T: ToString>(source_relay: T, destination_relay: T) -> Self
pub fn from<T: ToString>(source_relay: T, destination_relay: T) -> Self
Create IncompleteWork
from a source_relay
and destination_relay
that
can be converted to String
sourcepub fn is_source_relay<T: AsRef<str>>(&self, relay_fingerprint: T) -> bool
pub fn is_source_relay<T: AsRef<str>>(&self, relay_fingerprint: T) -> bool
Check whether the given relay fingerprint is of the source relay of IncompleteWork
sourcepub fn is_destination_relay<T: AsRef<str>>(&self, relay_fingerprint: T) -> bool
pub fn is_destination_relay<T: AsRef<str>>(&self, relay_fingerprint: T) -> bool
Check whether the given relay fingerprint is of the destination relay of IncompleteWork
Trait Implementations§
source§impl Clone for IncompleteWork
impl Clone for IncompleteWork
source§fn clone(&self) -> IncompleteWork
fn clone(&self) -> IncompleteWork
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for IncompleteWork
impl Send for IncompleteWork
impl Sync for IncompleteWork
impl Unpin for IncompleteWork
impl UnwindSafe for IncompleteWork
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.