Fix doc links
This commit is contained in:
parent
8d2b5502be
commit
989cc65d1c
|
@ -1,4 +1,4 @@
|
|||
//! Useful utilities for working with [`AnyValue`][Actor::AnyValue]s.
|
||||
//! Useful utilities for working with [`AnyValue`]s.
|
||||
|
||||
use preserves::value::Embeddable;
|
||||
use preserves::value::IOValue;
|
||||
|
@ -8,13 +8,13 @@ use std::convert::TryInto;
|
|||
|
||||
use crate::actor::*;
|
||||
|
||||
/// Converts an `AnyValue` to any [`syndicate::value::NestedValue`],
|
||||
/// Converts an `AnyValue` to any [`crate::value::NestedValue`],
|
||||
/// signalling an error if any embedded values are found in `v`.
|
||||
pub fn from_any_value<N: NestedValue<D>, D: Embeddable>(v: &AnyValue) -> Result<N, &'static str> {
|
||||
v.copy_via(&mut |_| Err("Embedded values cannot be converted")?)
|
||||
}
|
||||
|
||||
/// Converts any [`syndicate::value::NestedValue`] to an `AnyValue`,
|
||||
/// Converts any [`crate::value::NestedValue`] to an `AnyValue`,
|
||||
/// signalling an error if any embedded values are found in `v`.
|
||||
pub fn to_any_value<N: NestedValue<D>, D: Embeddable>(v: &N) -> Result<AnyValue, &'static str> {
|
||||
v.copy_via(&mut |_| Err("Embedded values cannot be converted")?)
|
||||
|
|
Loading…
Reference in New Issue