pub struct PartialVdf<'text> {
pub key: Key<'text>,
pub value: Value<'text>,
pub bases: Vec<Cow<'text, str>>,
}Expand description
A top-level VDF pair containing any top level #base directives as well
Obtained by calling parse() or Parser::parse(). See Vdf for the more broad
docs/API
Fields§
§key: Key<'text>§value: Value<'text>§bases: Vec<Cow<'text, str>>Implementations§
Source§impl<'a> PartialVdf<'a>
impl<'a> PartialVdf<'a>
Source§impl PartialVdf<'_>
impl PartialVdf<'_>
Source§impl<'text> PartialVdf<'text>
impl<'text> PartialVdf<'text>
Sourcepub fn into_vdf(self) -> Vdf<'text>
pub fn into_vdf(self) -> Vdf<'text>
Convert a top-level VDF pair into a Vdf, ignoring any #base directives
This is equivalent to calling Vdf::from<PartialVdf>() or .into()
Sourcepub fn into_owned(self) -> PartialVdf<'static>
pub fn into_owned(self) -> PartialVdf<'static>
Converts this PartialVdf into a fully owned variant
Internally a PartialVdf can reference the underlying text. This changes all of those
references to be be allocated instead, allowing for easier ownership
Trait Implementations§
Source§impl<'text> Clone for PartialVdf<'text>
impl<'text> Clone for PartialVdf<'text>
Source§fn clone(&self) -> PartialVdf<'text>
fn clone(&self) -> PartialVdf<'text>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'text> Debug for PartialVdf<'text>
impl<'text> Debug for PartialVdf<'text>
Source§impl Display for PartialVdf<'_>
impl Display for PartialVdf<'_>
Source§impl<'text> From<PartialVdf<'text>> for Vdf<'text>
impl<'text> From<PartialVdf<'text>> for Vdf<'text>
Source§fn from(partial: PartialVdf<'text>) -> Self
fn from(partial: PartialVdf<'text>) -> Self
Converts to this type from the input type.
Source§impl<'text> Hash for PartialVdf<'text>
impl<'text> Hash for PartialVdf<'text>
Source§impl<'text> Ord for PartialVdf<'text>
impl<'text> Ord for PartialVdf<'text>
Source§fn cmp(&self, other: &PartialVdf<'text>) -> Ordering
fn cmp(&self, other: &PartialVdf<'text>) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'text> PartialEq for PartialVdf<'text>
impl<'text> PartialEq for PartialVdf<'text>
Source§fn eq(&self, other: &PartialVdf<'text>) -> bool
fn eq(&self, other: &PartialVdf<'text>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<'text> PartialOrd for PartialVdf<'text>
impl<'text> PartialOrd for PartialVdf<'text>
impl<'text> Eq for PartialVdf<'text>
impl<'text> StructuralPartialEq for PartialVdf<'text>
Auto Trait Implementations§
impl<'text> Freeze for PartialVdf<'text>
impl<'text> RefUnwindSafe for PartialVdf<'text>
impl<'text> Send for PartialVdf<'text>
impl<'text> Sync for PartialVdf<'text>
impl<'text> Unpin for PartialVdf<'text>
impl<'text> UnsafeUnpin for PartialVdf<'text>
impl<'text> UnwindSafe for PartialVdf<'text>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more