rust: Refactor staticStd to stdLinkage

Instead of returning a boolean, return an enum value to improve
readability and provide greater flexibility for future modifications.

Bug: 168729404
Test: Soong tests pass
Change-Id: Iddcdae8c34be09e476404382e43d1ea5935bae65
diff --git a/rust/binary.go b/rust/binary.go
index e95cb3a..2758ae0 100644
--- a/rust/binary.go
+++ b/rust/binary.go
@@ -145,6 +145,9 @@
 	}
 }
 
-func (binary *binaryDecorator) staticStd(ctx *depsContext) bool {
-	return binary.baseCompiler.staticStd(ctx) || Bool(binary.Properties.Prefer_rlib)
+func (binary *binaryDecorator) stdLinkage(ctx *depsContext) RustLinkage {
+	if Bool(binary.Properties.Prefer_rlib) {
+		return RlibLinkage
+	}
+	return binary.baseCompiler.stdLinkage(ctx)
 }