[−][src]Struct twitter_text::autolinker::Autolinker
Adds HTML links to hashtag, username and list references in Tweet text.
Fields
no_follow: bool
url_class: &'a str
url_target: &'a str
symbol_tag: &'a str
text_with_symbol_tag: &'a str
list_class: &'a str
username_class: &'a str
hashtag_class: &'a str
cashtag_class: &'a str
username_url_base: &'a str
list_url_base: &'a str
hashtag_url_base: &'a str
cashtag_url_base: &'a str
invisible_tag_attrs: &'a str
username_include_symbol: bool
Implementations
impl<'a> Autolinker<'a>
[src]
pub fn new(no_follow: bool) -> Autolinker<'a>
[src]
An Autolinker with default properties.
pub fn autolink_entities(&self, text: &str, entities: &Vec<Entity>) -> String
[src]
pub fn autolink(&self, original: &str) -> String
[src]
Auto-link all entities.
pub fn autolink_usernames_and_lists(&self, text: &str) -> String
[src]
Auto-link the @username and @username/list references in the provided text. Links to @username references will have the username_class CSS classes added. Links to @username/list references will have the list_class CSS class added.
pub fn autolink_hashtags(&self, text: &str) -> String
[src]
Auto-link #hashtag references in the provided Tweet text. The #hashtag links will have the hashtag_class CSS class added.
pub fn autolink_urls(&self, text: &str) -> String
[src]
Auto-link URLs in the Tweet text provided. This only auto-links URLs with protocol.
pub fn autolink_cashtags(&self, text: &str) -> String
[src]
Auto-link $cashtag references in the provided Tweet text. The $cashtag links will have the cashtag_class CSS class added.
Auto Trait Implementations
impl<'a> RefUnwindSafe for Autolinker<'a>
impl<'a> Send for Autolinker<'a>
impl<'a> Sync for Autolinker<'a>
impl<'a> Unpin for Autolinker<'a>
impl<'a> UnwindSafe for Autolinker<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,