File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 48
48
- Support NIP-A0 (Voice Messages) (https://github.com/rust-nostr/nostr/pull/1032 )
49
49
- Add ` hex ` dependency (https://github.com/rust-nostr/nostr/pull/1051 )
50
50
- Add ` nip25::ReactionTarget ` (https://github.com/rust-nostr/nostr/pull/1063 )
51
+ - Add ` RelayUrl::host ` function (https://github.com/rust-nostr/nostr/pull/1066 )
51
52
52
53
### Changed
53
54
Original file line number Diff line number Diff line change @@ -166,6 +166,14 @@ impl RelayUrl {
166
166
self . url . domain ( )
167
167
}
168
168
169
+ /// Return the parsed representation of the host for this URL.
170
+ /// Non-ASCII domain labels are punycode-encoded per IDNA if this is the host
171
+ /// of a special URL, or percent encoded for non-special URLs.
172
+ #[ inline]
173
+ pub fn host ( & self ) -> Option < Host < & str > > {
174
+ self . url . host ( )
175
+ }
176
+
169
177
/// Return the serialization of this relay URL without the trailing slash.
170
178
///
171
179
/// This method will always remove the trailing slash.
You can’t perform that action at this time.
0 commit comments