Struct magic_wormhole::uri::WormholeTransferUri
source · pub struct WormholeTransferUri {
pub code: Code,
pub rendezvous_server: Option<Url>,
pub is_leader: bool,
}
Fields§
§code: Code
§rendezvous_server: Option<Url>
If Some
, a custom non-default rendezvous-server is being requested
is_leader: bool
By default, the “leader” (e.g. the file sender) generates the code (and thus the link), while the “follower” (receiver) parses the code. However, since not all devices can parse QR images equally well, this dynamic can be inversed.
For example, when sending a file from a smart phone to a computer, one would initiate the
transfer from the computer side (and thus set is_leader
to true
), because only the phone
has a camera.
Implementations§
Trait Implementations§
source§impl Clone for WormholeTransferUri
impl Clone for WormholeTransferUri
source§fn clone(&self) -> WormholeTransferUri
fn clone(&self) -> WormholeTransferUri
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 WormholeTransferUri
impl Debug for WormholeTransferUri
source§impl Display for WormholeTransferUri
impl Display for WormholeTransferUri
source§impl From<&WormholeTransferUri> for Url
impl From<&WormholeTransferUri> for Url
source§fn from(val: &WormholeTransferUri) -> Self
fn from(val: &WormholeTransferUri) -> Self
Converts to this type from the input type.
source§impl FromStr for WormholeTransferUri
impl FromStr for WormholeTransferUri
source§impl PartialEq for WormholeTransferUri
impl PartialEq for WormholeTransferUri
source§fn eq(&self, other: &WormholeTransferUri) -> bool
fn eq(&self, other: &WormholeTransferUri) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<&Url> for WormholeTransferUri
impl TryFrom<&Url> for WormholeTransferUri
§type Error = ParseError
type Error = ParseError
The type returned in the event of a conversion error.
source§impl TryFrom<Url> for WormholeTransferUri
impl TryFrom<Url> for WormholeTransferUri
§type Error = ParseError
type Error = ParseError
The type returned in the event of a conversion error.
impl Eq for WormholeTransferUri
impl StructuralEq for WormholeTransferUri
impl StructuralPartialEq for WormholeTransferUri
Auto Trait Implementations§
impl RefUnwindSafe for WormholeTransferUri
impl Send for WormholeTransferUri
impl Sync for WormholeTransferUri
impl Unpin for WormholeTransferUri
impl UnwindSafe for WormholeTransferUri
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