# Struct openssl::x509::extension::SubjectAlternativeName [−] [src]

    pub struct SubjectAlternativeName { /* fields omitted */ }

An extension that allows additional identities to be bound to the subject of the certificate.

## Implementations

### `impl SubjectAlternativeName` [src]

#### `pub fn new() -> SubjectAlternativeName` [src]

Construct a new `SubjectAlternativeName` extension.

#### `pub fn critical(&mut self) -> &mut SubjectAlternativeName` [src]

Sets the `critical` flag to `true`. The extension will be critical.

#### `pub fn email(&mut self, email: &str) -> &mut SubjectAlternativeName` [src]

Sets the `email` flag.

#### `pub fn uri(&mut self, uri: &str) -> &mut SubjectAlternativeName` [src]

Sets the `uri` flag.

#### `pub fn dns(&mut self, dns: &str) -> &mut SubjectAlternativeName` [src]

Sets the `dns` flag.

#### `pub fn rid(&mut self, rid: &str) -> &mut SubjectAlternativeName` [src]

Sets the `rid` flag.

#### `pub fn ip(&mut self, ip: &str) -> &mut SubjectAlternativeName` [src]

Sets the `ip` flag.

#### `pub fn dir_name(&mut self, dir_name: &str) -> &mut SubjectAlternativeName` [src]

Sets the `dirName` flag.

#### `pub fn other_name(&mut self, other_name: &str) -> &mut SubjectAlternativeName` [src]

Sets the `otherName` flag.

#### `pub fn build(
&self,
ctx: &X509v3Context<'_>
) -> Result<X509Extension, ErrorStack>` [src]

Return a `SubjectAlternativeName` extension as an `X509Extension`.

## Trait Implementations

### `impl Default for SubjectAlternativeName` [src]

#### `fn default() -> SubjectAlternativeName` [src]

Returns the “default value” for a type. Read more

## Auto Trait Implementations

### `impl RefUnwindSafe for SubjectAlternativeName`

### `impl Send for SubjectAlternativeName`

### `impl Sync for SubjectAlternativeName`

### `impl Unpin for SubjectAlternativeName`

### `impl UnwindSafe for SubjectAlternativeName`

## Blanket Implementations

### `impl<T> Any for T where
T: 'static + ?Sized,` [src]

#### `pub fn type_id(&self) -> TypeId` [src]

Gets the `TypeId` of `self`. Read more

### `impl<T> Borrow<T> for T where
T: ?Sized,` [src]

#### `pub fn borrow(&self) -> &T` [src]

Immutably borrows from an owned value. Read more

### `impl<T> BorrowMut<T> for T where
T: ?Sized,` [src]

#### `pub fn borrow_mut(&mut self) -> &mut T` [src]

Mutably borrows from an owned value. Read more

### `impl<T> From<T> for T` [src]

#### `pub fn from(t: T) -> T` [src]

Performs the conversion.

### `impl<T, U> Into<U> for T where
U: From<T>,` [src]

#### `pub fn into(self) -> U` [src]

Performs the conversion.

### `impl<T, U> TryFrom<U> for T where
U: Into<T>,` [src]

#### `type Error = Infallible`

The type returned in the event of a conversion error.

#### `pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>` [src]

Performs the conversion.

### `impl<T, U> TryInto<U> for T where
U: TryFrom<T>,` [src]

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

The type returned in the event of a conversion error.

#### `pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>` [src]

Performs the conversion.