Struct XmlData
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§
§impl XmlData
impl XmlData
pub 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.
pub fn schema(&self) -> Option<&XmlSchema>
pub fn schema(&self) -> Option<&XmlSchema>
Returns information about the schema of the XML file, if existing.
pub fn into_string(self) -> String
pub fn into_string(self) -> String
Takes the XML string out from the struct.
Trait Implementations§
§impl<'a> FromSql<'a> for &'a XmlData
impl<'a> FromSql<'a> for &'a XmlData
§fn from_sql(value: &'a ColumnData<'static>) -> Result<Option<Self>>
fn from_sql(value: &'a ColumnData<'static>) -> Result<Option<Self>>
Returns the value,
None being a null value, copying the value.§impl FromSqlOwned for XmlData
impl FromSqlOwned for XmlData
§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.§impl<'a> IntoSql<'a> for &'a XmlData
impl<'a> IntoSql<'a> for &'a XmlData
§fn into_sql(self) -> ColumnData<'a>
fn into_sql(self) -> ColumnData<'a>
Convert to a value understood by the SQL Server. Conversion by-value.
§impl<'a> IntoSql<'a> for XmlData
impl<'a> IntoSql<'a> for XmlData
§fn into_sql(self) -> ColumnData<'a>
fn into_sql(self) -> ColumnData<'a>
Convert to a value understood by the SQL Server. Conversion by-value.
§impl ToSql for XmlData
impl ToSql for XmlData
§fn to_sql(&self) -> ColumnData<'_>
fn to_sql(&self) -> ColumnData<'_>
Convert to a value understood by the SQL Server. Conversion
by-reference.
impl Eq for XmlData
impl StructuralPartialEq for XmlData
Auto Trait Implementations§
impl Freeze for XmlData
impl RefUnwindSafe for XmlData
impl Send for XmlData
impl Sync for XmlData
impl Unpin for XmlData
impl UnwindSafe for XmlData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more