Skip to main content

Ns

Enum Ns 

Source
pub enum Ns {
Show 21 variants Office, Text, Style, Table, Draw, Presentation, Chart, Fo, Svg, Number, Meta, Manifest, Config, Of, Xlink, Dc, Loext, Calcext, Xmlns, Other(Box<str>), None,
}
Expand description

An XML namespace, resolved from the URI it was declared with.

ODF spells every one of these with a conventional prefix and an invariant URI. Matching is on this rather than on the prefix, because the prefix is the document’s choice and the URI is the format’s.

Variants§

§

Office

urn:oasis:names:tc:opendocument:xmlns:office:1.0

§

Text

urn:oasis:names:tc:opendocument:xmlns:text:1.0

§

Style

urn:oasis:names:tc:opendocument:xmlns:style:1.0

§

Table

urn:oasis:names:tc:opendocument:xmlns:table:1.0

§

Draw

urn:oasis:names:tc:opendocument:xmlns:drawing:1.0

§

Presentation

urn:oasis:names:tc:opendocument:xmlns:presentation:1.0

§

Chart

urn:oasis:names:tc:opendocument:xmlns:chart:1.0

§

Fo

urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0, which is where most of the formatting attributes live.

§

Svg

urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0

§

Number

urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0

§

Meta

urn:oasis:names:tc:opendocument:xmlns:meta:1.0

§

Manifest

urn:oasis:names:tc:opendocument:xmlns:manifest:1.0

§

Config

urn:oasis:names:tc:opendocument:xmlns:config:1.0

§

Of

urn:oasis:names:tc:opendocument:xmlns:of:1.2, the formula namespace.

http://www.w3.org/1999/xlink

§

Dc

http://purl.org/dc/elements/1.1/

§

Loext

urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0

§

Calcext

urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0

§

Xmlns

A namespace declaration: xmlns:foo="...". Held as an attribute so that writing a tree re-declares exactly what reading it found.

§

Other(Box<str>)

A namespace this crate has no name for. The URI is kept so that the element is written back into the namespace it came from.

§

None

No namespace: an unprefixed name with no default declaration in scope.

Implementations§

Source§

impl Ns

Source

pub fn from_uri(uri: &str) -> Self

The namespace a URI denotes.

Source§

impl Ns

Source

pub fn conventional_prefix(&self) -> &str

The prefix ODF spells a namespace with, for a name written into a document that does not declare one of its own.

Trait Implementations§

Source§

impl Clone for Ns

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Ns

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Ns

Source§

impl Hash for Ns

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Ns

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Ns

Auto Trait Implementations§

§

impl Freeze for Ns

§

impl RefUnwindSafe for Ns

§

impl Send for Ns

§

impl Sync for Ns

§

impl Unpin for Ns

§

impl UnsafeUnpin for Ns

§

impl UnwindSafe for Ns

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.