Struct urn::UrnBuilder[][src]

pub struct UrnBuilder { /* fields omitted */ }
Expand description

A struct used for constructing URNs.

Implementations

Create a new UrnBuilder.

Change the namespace.

Change the namespace-specific string.

Change the r-component.

Change the q-component.

Change the f-component.

Validate the data and create the URN.

Example

let urn = UrnBuilder::new("example", "1234:5678").build()?;
assert_eq!(urn.to_string(), "urn:example:1234:5678");
assert_eq!(urn, "urn:example:1234:5678".parse()?); // Using std::str::parse

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.