File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed
Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ pub enum ModpkgLicense {
2828}
2929
3030impl ModpkgLicense {
31+ /// The total size of the license when written to bytes.
3132 #[ inline]
3233 pub fn size ( & self ) -> usize {
3334 1 + match self {
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ pub struct ModpkgMetadata {
5858}
5959
6060impl ModpkgMetadata {
61+ /// The total size of the metadata when written to bytes.
6162 pub fn size ( & self ) -> usize {
6263 ( self . name . len ( ) + size_of :: < u32 > ( ) )
6364 + ( self . display_name . len ( ) + size_of :: < u32 > ( ) )
@@ -125,6 +126,7 @@ impl ModpkgAuthor {
125126}
126127
127128impl ModpkgAuthor {
129+ /// The total size of the author when written to bytes.
128130 pub fn size ( & self ) -> usize {
129131 ( self . name . len ( ) + size_of :: < u32 > ( ) ) + ( optional_string_len ( & self . role ) + size_of :: < u32 > ( ) )
130132 }
You can’t perform that action at this time.
0 commit comments