pub struct SlackRelaxedUrl(pub String);Expand description
This type is needed since Slack allowes invalid URLs in some places like Rich sections and we still need to read them on the client side, so we store it as a string but provide convinent messages to convert to Url if possible.
Tuple Fields§
§0: StringImplementations§
Source§impl SlackRelaxedUrl
impl SlackRelaxedUrl
pub fn to_url(&self) -> Result<Url, ParseError>
Trait Implementations§
Source§impl AsRef<str> for SlackRelaxedUrl
impl AsRef<str> for SlackRelaxedUrl
Source§impl Clone for SlackRelaxedUrl
impl Clone for SlackRelaxedUrl
Source§fn clone(&self) -> SlackRelaxedUrl
fn clone(&self) -> SlackRelaxedUrl
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SlackRelaxedUrl
impl Debug for SlackRelaxedUrl
Source§impl<'de> Deserialize<'de> for SlackRelaxedUrl
impl<'de> Deserialize<'de> for SlackRelaxedUrl
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for SlackRelaxedUrl
impl Display for SlackRelaxedUrl
impl Eq for SlackRelaxedUrl
Source§impl From<&String> for SlackRelaxedUrl
impl From<&String> for SlackRelaxedUrl
Source§impl From<&Url> for SlackRelaxedUrl
impl From<&Url> for SlackRelaxedUrl
Source§impl From<&str> for SlackRelaxedUrl
impl From<&str> for SlackRelaxedUrl
Source§impl From<String> for SlackRelaxedUrl
impl From<String> for SlackRelaxedUrl
Source§impl From<Url> for SlackRelaxedUrl
impl From<Url> for SlackRelaxedUrl
Source§impl FromStr for SlackRelaxedUrl
impl FromStr for SlackRelaxedUrl
Source§impl Hash for SlackRelaxedUrl
impl Hash for SlackRelaxedUrl
Source§impl PartialEq for SlackRelaxedUrl
impl PartialEq for SlackRelaxedUrl
Source§impl Serialize for SlackRelaxedUrl
impl Serialize for SlackRelaxedUrl
impl StructuralPartialEq for SlackRelaxedUrl
Source§impl TryFrom<&SlackRelaxedUrl> for Url
impl TryFrom<&SlackRelaxedUrl> for Url
Source§type Error = ParseError
type Error = ParseError
The type returned in the event of a conversion error.
Source§impl TryFrom<SlackRelaxedUrl> for Url
impl TryFrom<SlackRelaxedUrl> for Url
Source§type Error = ParseError
type Error = ParseError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for SlackRelaxedUrl
impl RefUnwindSafe for SlackRelaxedUrl
impl Send for SlackRelaxedUrl
impl Sync for SlackRelaxedUrl
impl Unpin for SlackRelaxedUrl
impl UnsafeUnpin for SlackRelaxedUrl
impl UnwindSafe for SlackRelaxedUrl
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