Type Alias PointVar

Source
pub type PointVar = PointDef<RouteSegVar, PointSegVar>;
Expand description

A Point with potential Variables and Context (see PointCtx) this point may look like my-domain:users:${user} in which case before it can be made into a usable point it must be resolved like so:

use std::str::FromStr;
use cosmic_space::loc::{Point, PointVar};
let point_var = PointVar::from_str("my-domain:users:${user}")?;
let point: Point = point_var.to_resolve(&env)?;

Aliased Type§

pub struct PointVar {
    pub route: RouteSegVar,
    pub segments: Vec<PointSegVar>,
}

Fields§

§route: RouteSegVar§segments: Vec<PointSegVar>

Implementations§

Trait Implementations§

Source§

impl FromStr for PointVar

Source§

type Err = SpaceErr

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl ToResolved<PointDef<RouteSeg, PointSeg>> for PointVar

Source§

impl ToResolved<PointDef<RouteSeg, PointSegCtx>> for PointVar