Module sui::url
URL: standard Uniform Resource Locator string
use std::ascii;
use std::option;
use std::vector;
Struct `Url`
Standard Uniform Resource Locator (URL) string.public struct Url has copy, drop, store
Fields
Function `new_unsafe`
Create a Url, with no validationpublic fun new_unsafe(url: std::ascii::String): sui::url::Url
Implementation
public fun new_unsafe(url: String): Url {
Url { url }
}
Function `new_unsafe_from_bytes`
Create a Url with no validation from bytes Note: this will abort if bytes is not valid ASCIIpublic fun new_unsafe_from_bytes(bytes: vector<u8>): sui::url::Url
Implementation
public fun new_unsafe_from_bytes(bytes: vector<u8>): Url {
let url = bytes.to_ascii_string();
Url { url }
}
Function `inner_url`
Get inner URLpublic fun inner_url(self: &sui::url::Url): std::ascii::String
Function `update`
Update the inner URLpublic fun update(self: &mut sui::url::Url, url: std::ascii::String)