pub struct XmlData { /* private fields */ }
Expand description
A representation of XML data in TDS. Holds the data as a UTF-8 string and and optional information about the schema.
Implementations§
source§impl XmlData
impl XmlData
sourcepub fn new(data: impl ToString) -> Self
pub fn new(data: impl ToString) -> Self
Create a new XmlData with the given string. Validation of the XML data happens in the database.
sourcepub fn schema(&self) -> Option<&XmlSchema>
pub fn schema(&self) -> Option<&XmlSchema>
Returns information about the schema of the XML file, if existing.
sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Takes the XML string out from the struct.
Trait Implementations§
source§impl FromSqlOwned for XmlData
impl FromSqlOwned for XmlData
source§fn from_sql_owned(value: ColumnData<'static>) -> Result<Option<Self>>
fn from_sql_owned(value: ColumnData<'static>) -> Result<Option<Self>>
Returns the value,
None
being a null value, taking the ownership.source§impl<'a> IntoSql<'a> for &'a XmlData
impl<'a> IntoSql<'a> for &'a XmlData
source§fn into_sql(self) -> ColumnData<'a>
fn into_sql(self) -> ColumnData<'a>
Convert to a value understood by the SQL Server. Conversion by-value.
source§impl<'a> IntoSql<'a> for XmlData
impl<'a> IntoSql<'a> for XmlData
source§fn into_sql(self) -> ColumnData<'a>
fn into_sql(self) -> ColumnData<'a>
Convert to a value understood by the SQL Server. Conversion by-value.
source§impl PartialEq<XmlData> for XmlData
impl PartialEq<XmlData> for XmlData
source§impl ToSql for XmlData
impl ToSql for XmlData
source§fn to_sql(&self) -> ColumnData<'_>
fn to_sql(&self) -> ColumnData<'_>
Convert to a value understood by the SQL Server. Conversion
by-reference.