Skip to content

Commit fad3fc6

Browse files
committed
docs: add more docs to functions
1 parent b91bc2b commit fad3fc6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,14 +421,17 @@ impl Url {
421421
unsafe { ffi::ada_set_protocol(self.url, input.as_ptr().cast(), input.len()) }
422422
}
423423

424+
/// A URL includes credentials if its username or password is not the empty string.
424425
pub fn has_credentials(&self) -> bool {
425426
unsafe { ffi::ada_has_credentials(self.url) }
426427
}
427428

429+
/// Returns true if it has an host but it is the empty string.
428430
pub fn has_empty_hostname(&self) -> bool {
429431
unsafe { ffi::ada_has_empty_hostname(self.url) }
430432
}
431433

434+
/// Returns true if it has a host (included an empty host)
432435
pub fn has_hostname(&self) -> bool {
433436
unsafe { ffi::ada_has_hostname(self.url) }
434437
}

0 commit comments

Comments
 (0)