pub struct Url(/* private fields */);Expand description
The string representation of a URL, either absolute or relative, that has been verified as a valid URL on construction.
Implementations§
Source§impl Url
impl Url
Sourcepub fn parse_absolute(input: &str) -> Result<Self, ParseError>
pub fn parse_absolute(input: &str) -> Result<Self, ParseError>
Sourcepub fn parse_relative(input: &str) -> Result<Self, ParseError>
pub fn parse_relative(input: &str) -> Result<Self, ParseError>
Parse a relative path as URL.
§Errors
Returns an error if the string is not a relative path or can’t be converted to an url.
pub fn as_str(&self) -> &str
Trait Implementations§
Source§impl JsonSchema for Url
impl JsonSchema for Url
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for Url
Auto Trait Implementations§
impl Freeze for Url
impl RefUnwindSafe for Url
impl Send for Url
impl Sync for Url
impl Unpin for Url
impl UnwindSafe for Url
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