Skip to content

Commit

Permalink
twiq: Add MyTweet::entities
Browse files Browse the repository at this point in the history
  • Loading branch information
bouzuya committed Aug 12, 2022
1 parent 1095639 commit 0d1508d
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions twiq/crates/domain/src/lib.rs
Expand Up @@ -7,13 +7,32 @@ struct MyTweet {
user_name: String,
user_icon: String,
text: String,
entities: MyTweetEntities,
}

struct MyTweetEntities {
hashtags: Vec<MyTweetHashtag>,
mentions: Vec<MyTweetMention>,
urls: Vec<MyTweetUrl>,
}

struct MyTweetHashtag {
end: usize,
start: usize,
tag: String,
}

struct MyTweetMention {
end: usize,
start: usize,
username: String,
}

struct MyTweetUrl {
display_url: String,
expand_url: String,
indices: Vec<usize>,
end: usize,
expanded_url: String,
start: usize,
url: String,
}

Expand Down

0 comments on commit 0d1508d

Please sign in to comment.