pub struct CoapUri { /* private fields */ }
Expand description
Representation of a URI for CoAP requests or responses.
Implementations§
Source§impl CoapUri
impl CoapUri
Sourcepub fn new(
scheme: Option<CoapUriScheme>,
host: Option<CoapUriHost>,
port: Option<u16>,
path: Option<Vec<String>>,
query: Option<Vec<String>>,
) -> CoapUri
pub fn new( scheme: Option<CoapUriScheme>, host: Option<CoapUriHost>, port: Option<u16>, path: Option<Vec<String>>, query: Option<Vec<String>>, ) -> CoapUri
Creates a new CoapUri from the given components.
Sourcepub fn try_from_url(url: Url) -> Result<CoapUri, UriParsingError>
pub fn try_from_url(url: Url) -> Result<CoapUri, UriParsingError>
Sourcepub fn scheme(&self) -> Option<&CoapUriScheme>
pub fn scheme(&self) -> Option<&CoapUriScheme>
Returns the scheme part of this URI.
Sourcepub fn host(&self) -> Option<&CoapUriHost>
pub fn host(&self) -> Option<&CoapUriHost>
Returns the host part of this URI.
Sourcepub fn path_iter(&self) -> Option<Iter<'_, String>>
pub fn path_iter(&self) -> Option<Iter<'_, String>>
Returns an iterator over the path components of this URI.
Sourcepub fn drain_query_iter(&mut self) -> Option<Drain<'_, String>>
pub fn drain_query_iter(&mut self) -> Option<Drain<'_, String>>
Drains the parts of the URI query of this CoapUri into an iterator.
Sourcepub fn query_iter(&self) -> Option<Iter<'_, String>>
pub fn query_iter(&self) -> Option<Iter<'_, String>>
Returns an iterator over the query components of this URI.
Trait Implementations§
Source§impl TryFrom<CoapUri> for CoapResponseLocation
impl TryFrom<CoapUri> for CoapResponseLocation
impl Eq for CoapUri
impl StructuralPartialEq for CoapUri
Auto Trait Implementations§
impl Freeze for CoapUri
impl RefUnwindSafe for CoapUri
impl Send for CoapUri
impl Sync for CoapUri
impl Unpin for CoapUri
impl UnwindSafe for CoapUri
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