Sha256: b06024ef5edffeef31763427a17d416a5c8ea4a0dcc09325a7366cc53e22f9de

Contents?: true

Size: 195 Bytes

Versions: 13

Compression:

Stored size: 195 Bytes

Contents

use magnus::{TryConvert, Value};

pub fn try_convert_string(value: Value) -> Option<String> {
    match TryConvert::try_convert(value) {
        Ok(s) => Some(s),
        Err(_) => None,
    }
}

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
commonmarker-2.0.0 ext/commonmarker/src/utils.rs
commonmarker-1.1.5 ext/commonmarker/src/utils.rs
commonmarker-1.1.4 ext/commonmarker/src/utils.rs
commonmarker-1.1.2 ext/commonmarker/src/utils.rs
commonmarker-1.1.1 ext/commonmarker/src/utils.rs
commonmarker-1.1.0 ext/commonmarker/src/utils.rs
commonmarker-1.0.4 ext/commonmarker/src/utils.rs
commonmarker-1.0.3 ext/commonmarker/src/utils.rs
commonmarker-1.0.2 ext/commonmarker/src/utils.rs
commonmarker-1.0.1 ext/commonmarker/src/utils.rs
commonmarker-1.0.0 ext/commonmarker/src/utils.rs
commonmarker-1.0.0.pre12 ext/commonmarker/src/utils.rs
commonmarker-1.0.0.pre11 ext/commonmarker/src/utils.rs