Struct xmpp_parsers::jingle_s5b::Transport
source · pub struct Transport {
pub sid: StreamId,
pub dstaddr: Option<String>,
pub mode: Mode,
pub candidates: Vec<Candidate>,
pub state: Option<TransportState>,
}
Expand description
Describes a Jingle transport using a direct or proxied connection.
Fields§
§sid: StreamId
The stream identifier for this transport.
dstaddr: Option<String>
The destination address.
mode: Mode
The mode to be used for the transfer.
candidates: Vec<Candidate>
Offered candidates
This must be empty if state
is not None.
state: Option<TransportState>
A substate in relation to this transport.
This must be None if there is more than zero candidates
.
Implementations§
source§impl Transport
impl Transport
sourcepub fn with_dstaddr(self, dstaddr: String) -> Transport
pub fn with_dstaddr(self, dstaddr: String) -> Transport
Sets the destination address of this transport.
sourcepub fn with_state(self, state: TransportState) -> Transport
pub fn with_state(self, state: TransportState) -> Transport
Sets the payload of this transport.
This clears the candidates
field.
sourcepub fn with_candidates(self, candidates: Vec<Candidate>) -> Transport
pub fn with_candidates(self, candidates: Vec<Candidate>) -> Transport
Set the candidates of this transport.
This clears the state
field.
Trait Implementations§
source§impl From<Transport> for Transport
impl From<Transport> for Transport
source§fn from(transport: Socks5Transport) -> Transport
fn from(transport: Socks5Transport) -> Transport
Converts to this type from the input type.
source§impl PartialEq for Transport
impl PartialEq for Transport
impl StructuralPartialEq for Transport
Auto Trait Implementations§
impl Freeze for Transport
impl RefUnwindSafe for Transport
impl Send for Transport
impl Sync for Transport
impl Unpin for Transport
impl UnwindSafe for Transport
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