mirror of
https://git.proxmox.com/git/perlmod
synced 2025-10-26 14:29:42 +00:00
perlmod: doc fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
3e1adbd039
commit
577f68753f
@ -87,7 +87,7 @@ impl Value {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// If the value is a hash, returns the associated [`Hash`].
|
/// If the value is a hash, returns the associated [`struct@Hash`].
|
||||||
pub fn as_hash(&self) -> Option<&Hash> {
|
pub fn as_hash(&self) -> Option<&Hash> {
|
||||||
match self {
|
match self {
|
||||||
Value::Hash(v) => Some(v),
|
Value::Hash(v) => Some(v),
|
||||||
@ -95,7 +95,7 @@ impl Value {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// If the value is a hash, returns the associated mutable [`Hash`].
|
/// If the value is a hash, returns the associated mutable [`struct@Hash`].
|
||||||
pub fn as_hash_mut(&mut self) -> Option<&mut Hash> {
|
pub fn as_hash_mut(&mut self) -> Option<&mut Hash> {
|
||||||
match self {
|
match self {
|
||||||
Value::Hash(v) => Some(v),
|
Value::Hash(v) => Some(v),
|
||||||
@ -194,7 +194,7 @@ impl Value {
|
|||||||
self.bless_sv(&pkgsv)
|
self.bless_sv(&pkgsv)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Same as [`bless`] but the package string is already a perl [`ScalarRef`].
|
/// Same as [`bless`](Self::bless()) but the package string is already a perl [`ScalarRef`].
|
||||||
pub fn bless_sv(&self, pkgsv: &ScalarRef) -> Result<Value, Error> {
|
pub fn bless_sv(&self, pkgsv: &ScalarRef) -> Result<Value, Error> {
|
||||||
let stash = unsafe { ffi::RSPL_gv_stashsv(pkgsv.sv(), 0) };
|
let stash = unsafe { ffi::RSPL_gv_stashsv(pkgsv.sv(), 0) };
|
||||||
if stash.is_null() {
|
if stash.is_null() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user