Struct tor_linkspec::OwnedChanTargetBuilder
source · pub struct OwnedChanTargetBuilder { /* private fields */ }Expand description
Builder for OwnedChanTarget.
Implementations§
source§impl OwnedChanTargetBuilder
impl OwnedChanTargetBuilder
sourcepub fn from_linkspecs(
strictness: Strictness,
linkspecs: &[LinkSpec]
) -> Result<Self, ChanTargetDecodeError>
Available on crate feature decode only.
pub fn from_linkspecs( strictness: Strictness, linkspecs: &[LinkSpec] ) -> Result<Self, ChanTargetDecodeError>
decode only.Construct an OwnedChanTargetBuilder from a list of LinkSpec,
validating it according to a given level of Strictness.
source§impl OwnedChanTargetBuilder
impl OwnedChanTargetBuilder
sourcepub fn addrs(&mut self, value: Vec<SocketAddr>) -> &mut Self
pub fn addrs(&mut self, value: Vec<SocketAddr>) -> &mut Self
Copy of the addresses from the underlying ChanTarget.
sourcepub fn method(&mut self, value: ChannelMethod) -> &mut Self
pub fn method(&mut self, value: ChannelMethod) -> &mut Self
Copy of the channel methods from the underlying ChanTarget.
sourcepub fn ids(&mut self) -> &mut RelayIdsBuilder
pub fn ids(&mut self) -> &mut RelayIdsBuilder
Identities that this relay provides.
sourcepub fn build(&self) -> Result<OwnedChanTarget, OwnedChanTargetBuilderError>
pub fn build(&self) -> Result<OwnedChanTarget, OwnedChanTargetBuilderError>
source§impl OwnedChanTargetBuilder
impl OwnedChanTargetBuilder
sourcepub fn ed_identity(&mut self, id: Ed25519Identity) -> &mut Self
pub fn ed_identity(&mut self, id: Ed25519Identity) -> &mut Self
Set the ed25519 identity in this builder to id.
sourcepub fn rsa_identity(&mut self, id: RsaIdentity) -> &mut Self
pub fn rsa_identity(&mut self, id: RsaIdentity) -> &mut Self
Set the RSA identity in this builder to id.
Trait Implementations§
source§impl Clone for OwnedChanTargetBuilder
impl Clone for OwnedChanTargetBuilder
source§fn clone(&self) -> OwnedChanTargetBuilder
fn clone(&self) -> OwnedChanTargetBuilder
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 moresource§impl Debug for OwnedChanTargetBuilder
impl Debug for OwnedChanTargetBuilder
Auto Trait Implementations§
impl RefUnwindSafe for OwnedChanTargetBuilder
impl Send for OwnedChanTargetBuilder
impl Sync for OwnedChanTargetBuilder
impl Unpin for OwnedChanTargetBuilder
impl UnwindSafe for OwnedChanTargetBuilder
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